>> Hmm. Can you give real-world examples (of existing code) where you >> needed this? Jiwon> Apparently, simplest example is, Jiwon> collection.visit(lambda x: print x) Sure, but has several other people have indicated, statements are not expressions in Python as they are in C (or in Lisp, which doesn't have statements). You can't do this either: if print x: print 5 because "print x" is a statement, while the if statement only accepts expressions. Lambdas are expressions. Statements can't be embedded in expressions. That statements and expressions are different is a core feature of the language. That is almost certainly not going to change. Skip
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