On Tue, Jun 23, 2020 at 8:44 AM Mathew Elman <mathew.el...@ocado.com> 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 -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/EW6BLWVR27ZTKGLLO5YYEGJY3M5HOPVI/ Code of Conduct: http://python.org/psf/codeofconduct/