[issue25579] def is not a keyword with tokenize.py

SilentGhost report at bugs.python.org
Sat Nov 7 11:07:18 EST 2015


SilentGhost added the comment:

Perhaps, my example wasn't as self-explanatory as I hoped. def is not DEF in the token list, because there isn't such a token DEF, as there isn't a token PASS or a token for any other keyword. The fact that there is an ASYNC and AWAIT tokens is something completely different and is not related to keywords as such. The link I provided lists all the tokens in the token module.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25579>
_______________________________________


More information about the Python-bugs-list mailing list