[Armin Rigo Tue, Jun 15, 2004 at 05:56:07PM +0100]
> There was talk about subtle string parsing, or about using Python's parser or
> compiler package, but actually it is much easier than that... Just try to
> split the text "x,y" between the parenthesis in two halves at every possible
> comma position, until both halves compile without raising SyntaxError :-)
btw, using
import parser
parser.expr(string)
is way faster than invoking the whole compiling machinery. Of course,
'compile' doesn't require an import builtin but then again you have to
think up arbitrary arguments to this builtin :-)
holger
_______________________________________________
[EMAIL PROTECTED]
http://codespeak.net/mailman/listinfo/pypy-dev