Pablo Galindo Salgado [mailto:pablogsal@gmail.com] wrote:
We already expose APIs that return AST objects that can be used for all sort of things and a tokenizer module that exposes some form of lexing that is relatively close to the one that CPython uses internally.
What do you envision tokenize.py will do with f-strings after this? What would be the output of, say, $ echo 'f"hello {world!r}."' | python3 -m tokenize ? regards, Anders
What do you envision tokenize.py will do with f-strings after this?
It will emit new tokens: FSTRING_START FSTRING_MIDDLE '{' NAME
FSTRING_FORMAT '}' FSTRING_END
On Tue, 21 Sept 2021 at 12:50, Anders Munch
Pablo Galindo Salgado [mailto:pablogsal@gmail.com] wrote:
We already expose APIs that return AST objects that can be used for all sort of things and a tokenizer module that exposes some form of lexing that is relatively close to the one that CPython uses internally.
What do you envision tokenize.py will do with f-strings after this? What would be the output of, say, $ echo 'f"hello {world!r}."' | python3 -m tokenize ?
regards, Anders
_______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-leave@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/XXHWMINT... Code of Conduct: http://python.org/psf/codeofconduct/
participants (2)
-
Anders Munch
-
Pablo Galindo Salgado