Greg, On 2015-04-22 7:47 PM, Greg Ewing wrote: > Yury Selivanov wrote: > >> On the other hand, I hate the idea >> of grammatically requiring parentheses for 'await' >> expressions. That feels non-pytonic to me. > > How is it any different from grammatically requiring > parens in an ordinary function call? Nobody ever > complained about that. It is different. 1. Because 'await' keyword might be at a great distance from the object you're really calling: await foo.bar.baz['spam']() +-----------------------+ Can I chain the calls: await foo()() ? or await foo().bar()? 2. Because there is no other keyword in python with similar behaviour. 3. Moreover: unless I can write 'await future' - your proposal *won't* work with a lot of existing code and patterns. It's going to be radically different from all other languages that implement 'await' too. Yury
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