On 2018-04-20 12:43, Chris Angelico wrote: > Except that that's now a feature of expressions, NOT of the loop > construct. And then you're left with: why not permit this everywhere? Sorry, I didn't understand. Didn't mean to imply it couldn't be used everywhere. > What would these mean? My expectations: with open(fn) as f: # current behavior with (open(fn) as f): # syntax error, missing clause with closing(urlopen(url)) as dl: # current behavior with closing(urlopen(url) as dl): # syntax error, missing clause with (closing(urlopen(url)) as dl): # syntax error, missing clause In other words, the with statement would continue to require an as clause outside of the parentheses. A double name binding doesn't seem very useful however. -Mike
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