[Python-Dev] Consistent logging in the standard library
Barry Warsaw
barry at python.org
Wed Sep 17 17:56:50 EDT 2003
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
More information about the Python-Dev
mailing list