New submission from Andrea Corbellini <andrea.corbell...@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 <rep...@bugs.python.org> <http://bugs.python.org/issue5082> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com