[issue41967] Handle annotations in the parser to avoid the need for roundtrip
Guido van Rossum
report at bugs.python.org
Wed Oct 7 15:36:02 EDT 2020
Guido van Rossum <guido at python.org> added the comment:
Hm, this buffer thing is not what I had expected. I think it's a show-stopper -- if we don't reproduce spaces exactly.
Maybe we should just buffer the entire input always?
A way to handle multi-line annotations would be to surround them with parentheses? That way get_type_hints() doesn't need to change. Alternatively, strip comments and newlines in get_type_hints().
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41967>
_______________________________________
More information about the Python-bugs-list
mailing list