summaryrefslogtreecommitdiff
path: root/pylint/test/functional/newstyle__slots__.py
blob: 306d6a142e06bc76c7f0fc48f3c30d0657e9f0f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# pylint: disable=R0903
"""test __slots__ on old style class"""


class NewStyleClass(object):
    """correct usage"""
    __slots__ = ('a', 'b')


class OldStyleClass:  # <3.0:[old-style-class,slots-on-old-class]
    """bad usage"""
    __slots__ = ('a', 'b')

    def __init__(self):
        pass

__slots__ = 'hop'