> > So, while I'm not particularly keen on lambda, I'm not that keen on > > attrgetter either. But what could be better? All I can think of are > > slightly shorter but even more crippled forms of lambda; for example, > > we could invent a new keyword XXX so that the expression (XXX.foo) is > > equivalent to (lambda self: self.foo). This isn't very attractive. > > Doesn't have to be a keyword... I implemented something like this > years ago and then ditched it when list comps appeared. > > It would let you do things like > > >>> map(X + 1, range(2)) > [1, 2, 3] What was your notation like? Did you actually use 'X'? --Guido van Rossum (home page: http://www.python.org/~guido/)
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