[Python-Dev] inspect and metaclasses (original) (raw)
R. David Murray rdmurray at bitdance.com
Fri Sep 6 18:37:28 CEST 2013
- Previous message: [Python-Dev] inspect and metaclasses
- Next message: [Python-Dev] inspect and metaclasses
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Fri, 06 Sep 2013 08:59:02 -0700, Ethan Furman <ethan at stoneleaf.us> wrote:
On 09/06/2013 08:44 AM, R. David Murray wrote: > On Fri, 06 Sep 2013 08:14:09 -0700, Ethan Furman <ethan at stoneleaf.us> wrote: >> On 09/06/2013 07:47 AM, Armin Rigo wrote: >>> >>> Are you suggesting that inspect.getmro(A) would return (A, object, >>> type)? That seems very wrong to me. >> >> Currently,
inspect.getmro(A)
returns(A, object)
. > > Which matches A.mro. EOD, I think.I hope not, because currently this leaves a hole in the introspection of class attributes. Is mro aimed primarily at instances and not classes? That seems to be how it works. In which case, do we need another mmro (or cmro or ...) to handle the mro of classes themselves?
Or maybe just a new inspect function?
For the short term I can restrict the change to inspect.classifyclassattrs().
Sounds like the best course.
--David
- Previous message: [Python-Dev] inspect and metaclasses
- Next message: [Python-Dev] inspect and metaclasses
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]