class Foo: def bar(self): self.baz = True
class Foo: def __init__(self): self.baz = None def bar(self, value): self.baz = value
Used when an instance attribute is defined outside the __init__ method.
__init__