Added comment.py and metaclasses.py
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
import itertools
|
||||
|
||||
class InstanceCounterMeta(type):
|
||||
""" Metaclass to make instance counter not share count with descendants
|
||||
"""
|
||||
def __init__(cls, name, bases, attrs):
|
||||
super().__init__(name, bases, attrs)
|
||||
cls._ids = itertools.count(1)
|
||||
Reference in New Issue
Block a user