Phillip J. Eby wrote:
> Note that a "where" or "given" statement like this could make it a
> little easier to drop lambda.
I think the "lambda will disappear in Py3k" concept might have been what
triggered the original 'where' statement discussion.
The idea was to be able to lift an arbitrary subexpression out of a function
call or assignment statement without having to worry about affecting the
surrounding namespace, and without distracting attention from the original
statement. Basically, let a local refactoring *stay* local.
The discussion wandered fairly far afield from that original goal though.
One reason it fell apart was trying to answer the seemingly simple question
"What would this print?":
def f():
a = 1
b = 2
print 1, locals()
print 3, locals() given:
a = 2
c = 3
print 2, locals()
print 4, locals()
Cheers,
Nick.
--
Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia
---------------------------------------------------------------
http://boredomandlaziness.blogspot.com
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com