F
Fernando Rodriguez
Hi,
How can I list the superclasses of an object? O
TIA
How can I list the superclasses of an object? O
TIA
(<class __main__.A at 0x402db41c>, <class __main__.B at 0x402db44c>)Fernando said:Hi,
How can I list the superclasses of an object? O
[/QUOTE]
(<class __main__.A at 0x402db41c>, <class __main__.B at 0x402db44c>)
You may need a recursive walk up the (DA) graph if you also want
bases of bases, etc, among 'superclasses'; alternatively, but
ONLY for newstyle classes (recommended anyway for many reasons):
Fernando said:I didn't know the existence of the __bases__ attribute, and it doesn't
show
with dir(). How can I get a list of ALL the attributes of an object?
I thought that dir() listed every attribute.... O
I haven't used python in a while and all my classes are 'old style'. I'd
like to get up to date. Where can I find info about the differences /
advantages of
these new classes? Is it safe to convert all my previous classes to new
ones, and how can I do it? O
Fernando Rodriguez said:Hi,
How can I list the superclasses of an object? O
TIA
Fernando Rodriguez said:Where can I find info about the differences / advantages of
these new classes?
Is it safe to convert all my previous classes to new ones,
and how can I do it? O
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.