Question about ast.literal_eval

Fábio Santos fabiosantosart at gmail.com
Tue May 21 04:23:16 EDT 2013


On 21 May 2013 09:10, "Frank Millman" <frank at chagford.com> wrote:
> It doesn't address the issue of brackets. I imagine that the answer is
something like -
>
>   maintain a stack of results
>   for each left bracket, push a level
>   for each right bracket, pop the result
>
> or something ...
>

Time for me to suggest pyparsing or PLY. You're better off creating your
own AST and walking it to produce python or SQL than reinventing the wheel,
I think.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20130521/7977f501/attachment.html>


More information about the Python-list mailing list