[Python-ideas] Syntax for easy binding __name__, __module__, __qualname__ to arbitrary objects

Alexander Belopolsky alexander.belopolsky at gmail.com
Tue May 14 03:30:07 CEST 2013


On Mon, May 13, 2013 at 8:03 PM, Greg Ewing <greg.ewing at canterbury.ac.nz>wrote:

> I'd like to propose something a bit different:
>
>
>    def name as expr(arg, ...)
>

Note that in the current uses of "as" the assignment target is on the right:

with expr as name:

import pkg.mod as name

I am not sure "def expr(...) as name" is any better than Greg's original
proposal, though.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20130513/dddbc48d/attachment.html>


More information about the Python-ideas mailing list