On 4/23/07, Christian Heimes <[EMAIL PROTECTED]> wrote:
> >     Proposal:  Add a __module__ keyword which refers to the module
> >     currently being defined (executed).  (But see open issues.)

> -1 on __module__

> Also __module__ is already used in objects like classes.

Yes,  I worried that it might cause some confusion, but I also worry
that it might cause confusion *not* to reuse the name.

X.__module__ is the __module__ attribute of X
X.__class__ is the __class__ attribute of X

An (unqualified) __module__ would represent the current module.
An (unqualified) __class__ would represent the current class.

That said, the choice between reused short names (__module__) and
longer names (__this_module__, __current_module__, __thismodule__) is
indeed one of the open issues.  I'll count this as one vote against
the short forms.

-jJ
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to