On Apr 16, 9:29 pm, John Machin <sjmac...@lexicon.net> wrote: > On Apr 17, 1:57 am, prueba...@latinmail.com wrote: > > > COMP_REPLACERS={'LT':'<', 'GT':'>', 'LE':'<=', 'GE':'>=', '=':'==', > > '=>':'=>', '=<':'=<'} > > What do the '=>' and '=<' represent? Why are you replacing each by > itself?
because of this: groups=split_seccions(subst,COMP_REPLACERS.values()) I didn't want to create a separate variable. Those are dubious anyway, I haven't seen one in all of our current rules and it generates a syntax error in Python so I took them out: COMP_REPLACERS={'LT':'<', 'GT':'>', 'LE':'<=', 'GE':'>=', '=':'=='} And before somebody else points it out. This line: (TOK.NUMBER,str(vars_.get(x[1],x[1]))) if x[0]==TOK.NAME should really be: (TOK.NUMBER,str(vars_[x[1]])) if (x[0]==TOK.NAME and x[1] in vars_) -- http://mail.python.org/mailman/listinfo/python-list