A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2013-September/128366.html below:

[Python-Dev] inspect and metaclasses

[Python-Dev] inspect and metaclasses [Python-Dev] inspect and metaclassesArmin Rigo arigo at tunes.org
Fri Sep 6 16:47:15 CEST 2013
Hi Ethan,

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.


A bientôt,

Armin.
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4