On Thu, Mar 15, 2018 at 6:15 AM, Steven D'Aprano <st...@pearwood.info> wrote: > On Thu, Mar 15, 2018 at 01:32:35AM +0100, Mikhail V wrote: >
> Using spaces to separate items has the fatal flaw that it cannot > distinguish > > x - y 0 # two items, the expression `x - y` and the integer 0 > > from: > > x - y 0 # three items, `x`, `-y`, and 0 > When you say "it cannot distinguish" what is "it"? you mean current parser can't separate items due to the allowed unary negation operator? Well then it is not like I would parse the table, for this case my parsing rule would be: x - y 0 -> [x - y, 0] x-y -> [x - y, 0] x -y 0 -> [x, -y, 0] That's in case I use same char for unary negation and minus operator (which I find rather inconvinient for parsing). Mikhail _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/