Neil Girdhar added the comment:

The documentation suggests that you can have a metaclass that does is not the 
"most derived metaclass" provided you specify one that is not an instance of 
type.  This doesn't work in CPython, so I would suggest fixing the 
documentation using the text I provided.

After that, it should be clear that there's no reason for "if isinstance(meta, 
type):" in the code, and the Python code should be restructured.

The point is that these two functions drifted apart somewhere around Python 3, 
and they need to be brought back together.  I only discovered this because it 
was possible in Python 2 to have a non-type metaclass that is not the most 
derived metaclass.  That has disappeared in CPython 3, except from the 
documentation and Lib.


Python tracker <>
Python-bugs-list mailing list

Reply via email to