Пример #1
0
 class B(instance_tracker('_registry')):
     def __init__(self, x):
         self.x = x
         super().__init__()
Пример #2
0
 class A(instance_tracker('instances')):
     pass
Пример #3
0
 class Tracked(instance_tracker()):
     pass
Пример #4
0
 class A(instance_tracker()):
     pass
Пример #5
0
 class Squirrel(instance_tracker(), Animal):
     def __init__(self, name, nervousness=0.99):
         self.nervousness = nervousness
         super().__init__(name)
Пример #6
0
 class Tracked(instance_tracker()):
     def __init__(self, something):
         self.something = something
         super().__init__()