Added comment.py and metaclasses.py

This commit is contained in:
2019-03-31 17:16:37 +02:00
parent 19f0c466f7
commit 3ef75f488a
2 changed files with 22 additions and 0 deletions
+8
View File
@@ -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)