context manager based alternative to Re: Proposal: === and !===

Ethan Furman ethan at stoneleaf.us
Thu Jul 10 20:34:17 EDT 2014


On 07/10/2014 05:20 PM, Cameron Simpson wrote:
>
> I posted this the other day and haven't seen a response, not even a scathing rejection...
>
> Here's an alternative proposal that doesn't involve a new operator.

[snip float-context manager stuff]

Decimal has a context manager like that already (I don't know if it supports allowing NaNs to equal each other, though). 
  Rather than adding the whole thing to float, perhaps extending Decimal's context with that option is a possible route.

I would also prefer something like this to a new equals operator.

--
~Ethan~



More information about the Python-list mailing list