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 _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com