class B(instance_tracker('_registry')): def __init__(self, x): self.x = x super().__init__()
class A(instance_tracker('instances')): pass
class Tracked(instance_tracker()): pass
class A(instance_tracker()): pass
class Squirrel(instance_tracker(), Animal): def __init__(self, name, nervousness=0.99): self.nervousness = nervousness super().__init__(name)
class Tracked(instance_tracker()): def __init__(self, something): self.something = something super().__init__()