[Python-ideas] Approximately equal operator

Chris Angelico rosuav at gmail.com
Sat Jun 16 08:00:21 EDT 2018


On Sat, Jun 16, 2018 at 8:51 PM, Steven D'Aprano <steve at pearwood.info> wrote:
>> Python is *very* stingy with adding new operators; IIRC only 3 have
>> been added over the last ~30 years (**, //, @). I don't think ~= is
>> going to make it.
>
> Exponentiation ** goes back to Python 1.5, so I think that's only two
> new operators :-)
>

I'm not sure if they count or not, but 'await' and 'yield' are kinda
like unary operators. But yeah, the language is deliberately stingy
there.

ChrisA


More information about the Python-ideas mailing list