Guido van Rossum wrote:
> However, I'm fine with setting *another* variable to the full package
> name so someone who *really* wants to do relative imports here knows
> the package name.
OK, I'll do that. Any objections to __module_name__ as the name of the
variable? (to keep things simple, run_module() will always define the
variable, even if __name__ and __module_name__ say the same thing).
I'll then put a note in PEP 338 about the necessary hackery to make relative
imports work correctly from a main module - I don't see any reason to include
something like that in the normal docs, since the recommended approach is for
main modules to use absolute imports.
Cheers,
Nick.
--
Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia
---------------------------------------------------------------
http://www.boredomandlaziness.org
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com