[Python-Dev] Fix import errors to have data
Fred L. Drake, Jr.
fdrake at acm.org
Thu Jul 29 05:44:23 CEST 2004
On Wednesday 28 July 2004 06:40 pm, Bob Ippolito wrote:
> I've used sys.modules[__module__] to get a reference to the current
> module object. Mostly for running doctests I guess, but I've probably
> used it in other places.
Did you mean __name__?
__module__ is an attribute of classes that provides the __name__ of the
defining module.
-Fred
--
Fred L. Drake, Jr. <fdrake at acm.org>
More information about the Python-Dev
mailing list