class Foo:
__slots__ = 'bar'
def __init__(self, bar):
self.bar = bar
self.setup()
def setup(self):
pass
class Foo:
__slots__ = ('bar',)
def __init__(self, bar):
self.bar = bar
self.setup()
def setup(self):
pass
Used when a class __slots__
is a simple string, rather than an iterable.