I've read about new Python "keywords" async and await. However they are neither really keywords nor reserved in a namespace.
>>> import keyword
>>> keyword.iskeyword("async")
False
>>> async
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'async' is not defined
In the example I would expect True and SyntaxError for a keyword.
So, what exactly is async in Python? How it works?
asynconly applies in Python 3.5. Is that the version you are using?asyncandawaitaren't "real" keywords yet, but they will be in Python 3.7.asyncis a statement qualifier.asyncandawaithave no independent identity when defined without a function definition next to it. So they aren't keywords, but the compiler will recognise them if you put a lambda function next to it.