Alex Popescu <[EMAIL PROTECTED]> writes:
[...]
> I may be wrong but I think I've found a difference between my
> dir(module) approach
> and the inspect.getmembers(module, inspect.isclass): the first one
> returns the
> classes defined in the module, while the later also lists the imported
> available
> classes.

FWIW, see doctest.DocTestFinder._from_module() for a way to tell if an
object is from a module.  This can be fooled if you've managed to get
hold of two copies of a module, though, which unfortunately is
possible.

I hope the import system is much cleaner in Python 3 :-/ (seems there
are efforts in that direction, though I'm not up-to-date with it).


John
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to