[Python-ideas] Multiple statement lambda expressions

Musical Notation musicdenotation at gmail.com
Sun Aug 25 05:24:57 CEST 2013


What about this?
lambda x, y: a = sum(x)/len(x); b = sum(y)/len(y); (a+b)/2;;
The double-semicolon notation can also replace indentation for grouping of statements:

y=0
for x in list:
    y=2*y+x
    if y%13==0:
        y=12;;;;


More information about the Python-ideas mailing list