[issue41887] ast.literal_eval does not accept strings with leading whitespaces
Pablo Galindo Salgado
report at bugs.python.org
Sat Oct 3 10:32:49 EDT 2020
Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:
> I dunno, but it's been doing this since 1992, so I think it would be fragile to change. The best thing therefore is to make ast.literal_eval() match it exactly.
+1 We had considerable finicky behaviour in the parser related to new lines and whitespace so I would recommend to strive for stability.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41887>
_______________________________________
More information about the Python-bugs-list
mailing list