[Python-Dev] inspect and metaclasses
arigo at tunes.org
Fri Sep 6 16:47:15 CEST 2013
Are you suggesting that inspect.get_mro(A) would return (A, object,
type)? That seems very wrong to me.
If the goal is to fix `inspect.classify_class_attrs()`, then this
function only needs a specific fix, along the lines of looking in
`get_mro(A) + get_mro(type(A))`. (A more minor issue is that the bug
report suggests `... + (type(A),)` only, but that's wrong: Python will
also look in all the base classes of type(A).)
"Fixing" inspect.get_mro() as suggested would break a lot of other usages of it.
More information about the Python-Dev