Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #74363 > unrolled thread

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

Started byCameron Simpson <cs@zip.com.au>
First post2014-07-12 08:42 +1000
Last post2014-07-12 08:42 +1000
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: context manager based alternative to Re: Proposal: === and !=== Cameron Simpson <cs@zip.com.au> - 2014-07-12 08:42 +1000

#74363 — Re: context manager based alternative to Re: Proposal: === and !===

FromCameron Simpson <cs@zip.com.au>
Date2014-07-12 08:42 +1000
SubjectRe: context manager based alternative to Re: Proposal: === and !===
Message-ID<mailman.11765.1405118573.18130.python-list@python.org>
On 10Jul2014 17:34, Ethan Furman <ethan@stoneleaf.us> wrote:
>On 07/10/2014 05:20 PM, Cameron Simpson wrote:
>>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).

Interesting. I did not know that. [...] Ah, 9.4.3 Context Objects. Cool.

>Rather than adding the whole thing to float, perhaps extending Decimal's 
>context with that option is a possible route.

The OP needed to work with floats. The data storage systems he was using stored 
IEEE floats IIRC, so Decimal may not be suitable and possibly has performance 
effects too - dunno.

I would think he'd need something implemented in the float type.

Cheers,
Cameron Simpson <cs@zip.com.au>

Nothing is impossible for the man who doesn't have to do it.

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web