On Tue, Jun 23, 2020 at 8:44 AM Mathew Elman <[email protected]> wrote:

> Perhaps a more versatile operator would be to introduce a +- operator that
> would return an object with an __eq__ method that checks for equality in
> the tolerance i.e
>
>     a == b +- 0.5
>

This is already valid syntax, because unary minus is a thing. So this is
currently parsed as "a == b + (-0.5)".

Reversing it to use -+ won't work because unary plus is also a thing.
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/EW6BLWVR27ZTKGLLO5YYEGJY3M5HOPVI/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to