[ZODB-Dev] import problem?

Dieter Maurer dieter at handshake.de
Fri Apr 2 17:23:58 EST 2004


Chris Withers wrote at 2004-4-2 09:05 +0100:
> ...
>Packages/modules/etc are some of the most disappointing areas for me in python. 
>They behave inconsistently, and I wouldn't be suprised if there is no way to ask 
>python for the fully qualified dot-path of a class from a package relative to 
>the python path :-/

No need to be surprised:

  If "C" is a class "C.__name__" is its name
  and "C.__module__" the fully qualified dot-path relative to
  "sys.path" of the module containing the class definition.


Maybe, Python's packages/modules are less disappointing
than you are thinking...
... at least for people who (re-)read the Python documentation ;-)

-- 
Dieter



More information about the ZODB-Dev mailing list