[Python-Dev] nested packages and import order
Joerg Sonnenberger
joerg at britannica.bec.de
Mon Oct 6 08:48:10 EDT 2003
More information about the Python-Dev mailing list
Mon Oct 6 08:48:10 EDT 2003
- Previous message: Keyword-only arguments (Re: [Python-Dev] Efficient predicates for the standard library)
- Next message: [Python-Dev] Re: nested packages and import order
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi all, I have a package a.b with the following content: a/b/__init__.py: import a.b dir(a.b) Running this generates a AttributeError for b, obviously the import didn't add b to the module "a". Even though it can be argued that importing a package from within is bad style, this a clearly a bug since its at least surprising. Shouldn't the import create the namespace entry in a after it created the module entry in sys.modules? Joerg P.S.: Please CC me, I'm not subscriped
- Previous message: Keyword-only arguments (Re: [Python-Dev] Efficient predicates for the standard library)
- Next message: [Python-Dev] Re: nested packages and import order
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list