A 'foolproof' way to query inheritance tree?numbers.Real in 2.6)

P

pythonlist.calin79

Generally, if I want to know the inheritance tree of a class, I either
use inspect.getmro or __bases__

However, after reading about the new numbers module / class tower in
Python 2.6/3.0, I realized that both of these will fail to show that
the 'float' type actually inherits from numbers.Real:
(<class 'object'>,)

Is there a more foolproof way to query this information? Or is this
simply some sort of bug with the new implementation of numbers in
python 2.6?

- Paul
 

Ask a Question

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.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top