[Python-Dev] async/await in Python; v2
Łukasz Langa
lukasz at langa.pl
Fri Apr 24 21:04:27 CEST 2015
> On Apr 24, 2015, at 6:32 AM, Barry Warsaw <barry at python.org> wrote:
>
> On Apr 24, 2015, at 11:17 PM, Steven D'Aprano wrote:
>
>> It seems to me that tools that search for r"^\s*def\s+spam\s*\(" are
>
> They would likely search for something like r"^\s*def\s+[a-zA-Z0-9_]+" which
> will hit "def async spam" but not "async def”.
Realistically that can’t be what they’re doing because of multiple string literals, internal-scope functions, etc.
But I agree with Steven that guessing here is pointless. More importantly, consider:
- if we optimize for some unproven backwards compatibility with tools, we’re sacrificing better readability of “async def foo()”
- if that tool wants to work with Python 3.5, it’ll still have to support “await” so we’re going to be incompatible anyway; let alone “async for” and “async with”
So all in all, I don’t buy this argument.
--
Best regards,
Łukasz Langa
WWW: http://lukasz.langa.pl/
Twitter: @llanga
IRC: ambv on #python-dev
More information about the Python-Dev
mailing list