
Sept. 17, 2003
9:56 p.m.
On Wed, 2003-09-17 at 17:43, Vinay Sajip wrote:
Matthew Barnes, who kicked off the original thread, prefers "stdlib" as the prefix to use, rather than "python".
What about _ (underscore)? One of my half-baked totally unoriginal PEP ideas for Python 2.4 would be a syntax for forcing imports from the standard library. E.g. say I have a foo package, and inside there I've got a foo/logging.py module. Say there's also a foo/bar.py module and it wants to import the global logging package. How can it do that? "import logging" does a relative import. So the idea would be to be able to write "import _.logging" and definitely get the global logging package. Using underscore in the logger would mirror this mnemonic for globalness. -Barry