Is it dangeous when using custom metaclass?

dieter dieter at handshake.de
Thu Oct 18 01:04:02 EDT 2018


jfong at ms4.hinet.net writes:
> ...
> Hard to find the document of type.__init__. I can only guess it does nothing, at least no thing serious, to avoid trouble the metaclass's __init__ may cause in a class hierarchy:-)

You always have the possibility to look at the source.

All classes have common attributes "__bases__", "__module__", "__name__",
"__dict__", ....
They must come from somewhere. "type.__init__" could be this place.




More information about the Python-list mailing list