[issue25621] ast.literal_eval() fails on docstrings

2015-11-13 Thread R. David Murray
R. David Murray added the comment: Yes, literal_eval only evaluates a single literal, as is documented. -- nosy: +r.david.murray resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue25621] ast.literal_eval() fails on docstrings

2015-11-13 Thread Maxime Chambreuil
New submission from Maxime Chambreuil: ast.literal_eval fails when there is docstrings in the file. I used the file attached and this code in our CI server: def is_installable_module(path): """return False if the path doesn't contain an installable odoo module, and the full path to the

[issue25621] ast.literal_eval() fails on docstrings

2015-11-13 Thread Maxime Chambreuil
Maxime Chambreuil added the comment: If I remove the docstrings on the first line, ast.literal_eval() does not fail. -- ___ Python tracker ___

[issue25621] ast.literal_eval() fails on docstrings

2015-11-13 Thread SilentGhost
SilentGhost added the comment: It doesn't seem docstring-specific, docstring is a regular Python object and ast.literal_eval would fail if you have more than one literals of any kind. Put two integers in your file and the literal_eval will fail. -- nosy: +SilentGhost,