[Python-Dev] Re: let's not stretch a keyword's use
unreasonably, _please_...
Barry Warsaw
barry at python.org
Thu Oct 23 09:22:41 EDT 2003
On Thu, 2003-10-23 at 01:51, Terry Reedy wrote:
> So I really *don't* need global. Perhaps a new builtin
>
> def me():
> import sys
> return sys.modules[__name__]
+1, or just "import __me__"
I've often wanted a convenient way to get a hold of the current module
object. I use something like def me(), but it's a bit ugly and magical
looking.
-Barry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 307 bytes
Desc: This is a digitally signed message part
Url : http://mail.python.org/pipermail/python-dev/attachments/20031023/5aa0a928/attachment-0001.bin
More information about the Python-Dev
mailing list