class Foo:
def __init__(self, bar):
if self.bar:
pass
class Foo:
def __init__(self, bar):
self.bar = bar
if self.bar:
pass
Used when an instance member is accessed before it’s actually assigned.