[New-bugs-announce] [issue5082] Let frameworks to register attributes as builtins

Andrea Corbellini report at bugs.python.org
Tue Jan 27 17:38:08 CET 2009


New submission from Andrea Corbellini <andrea.corbellini at beeseek.org>:

Most of the Python frameworks have some functions and classes that are
widely used. For example a 'log.debug' function will be used in almost
all modules. It is inconvenient to write 'import log' every time.

It would be useful to have a special place (a dict or a special module)
where you can declare attributes that can be used everywhere without
importing anything. Currently, the only way to do this is:

>>> import __builtin__
>>> __builtin__.debug = log.debug

However, I think that this shouldn't be the better solution. Using
something like '__framework__' would be really better, in my opinion.

----------
components: Interpreter Core
messages: 80656
nosy: andrea-bs
severity: normal
status: open
title: Let frameworks to register attributes as builtins

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5082>
_______________________________________


More information about the New-bugs-announce mailing list