Would it work to generalise generator expressions in the following way: (x[1] for x) == lambda x:x[1] (x.score for x) == lambda x: x.score (x+y for x,y) == lambda x,y: x+y (len(x) for x) == lambda x,len=len: len(x) # roughly equivalent i.e. an anonymous block notation, with early binding semantics. It could work as a lambda replacement. But no-argument lambdas would require some extra ugliness. (1 for) == lambda:1 # yuck! (1 for ()) == lambda:1 # better? And should this be allowed? ((a,b) for a in l for b,l) == lambda b,l: ((a,b) for a in l) -- Greg Ball
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4