Example of setting metaclass to LoggingType
i spotted at my workplace.
import logging as _logging
class SomeClass(object):
__metaclass__ = _logging.LoggingType
Here is the example I have seen for ABCMeta
set to __metaclass__
I want to know the practical advantage if their is any example of setting ABCMeta as metaclass as shown below: from the docs
from abc import ABCMeta
class MyABC:
__metaclass__ = ABCMeta
to me my question sounds like how to take advantage of
register(subclass)
Register subclass as a “virtual subclass”
How can we benefit from it ?
If you find my question is repeated please link this post up !!