On Thu, Apr 23, 2015 at 01:51:52PM -0400, Barry Warsaw wrote: > Why "async def" and not "def async"? > > My concern is about existing tools that already know that "def" as the first > non-whitespace on the line starts a function/method definition. Think of a > regexp in an IDE that searches backwards from the current line to find the > function its defined on. Sure, tools can be updated but it is it *necessary* > to choose a syntax that breaks tools? Surely its the other way? If I'm searching for the definition of a function manually, I search for "def spam". `async def spam` will still be found, while `def async spam` will not. It seems to me that tools that search for r"^\s*def\s+spam\s*\(" are going to break whichever choice is made, while a less pedantic search like r"def\s+spam\s*\(" will work only if async comes first. -- Steve
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