[issue28964] AST literal_eval exceptions provide no information about line number

Steve Merritt report at bugs.python.org
Sun Jan 1 17:11:46 EST 2017


Steve Merritt added the comment:

We're using Python dictionaries to express sizeable (read: 100-600 lines)
chunks of configuration data. We previously used JSON, but we now use
Jinja2 to template chunks of this configuration data, and JSON's inability
to handle trailing commas creates a problem here. So we've been using
ast.literal_eval, but the lack of line numbers makes debugging problems
with the configurations a painful process.

On Sun, Jan 1, 2017 at 2:41 AM Serhiy Storchaka <report at bugs.python.org>
wrote:

>
> Serhiy Storchaka added the comment:
>
> Usually literal_eval() is used with short one-line input. For what large
> documents do you use it?
>
> ----------
> nosy: +serhiy.storchaka
>
> _______________________________________
> Python tracker <report at bugs.python.org>
> <http://bugs.python.org/issue28964>
> _______________________________________
>

----------

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


More information about the Python-bugs-list mailing list