Metaclasses in Python: a couple of questions to clarify
After crashing with metaclasses I delved into the topic of metaprogramming in Python and I have a couple of questions that are, imho, not clearly answered in available docs.
- When using both
__new__and__init__in a metaclass, should their arguments be defined the same? - What's most efficient way to define class
__init__in a metaclass? - Is there any way to refer to class instance (normally self) in a metaclass?