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


Groups > comp.lang.python > #74334

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

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <ethan@stoneleaf.us>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.030
X-Spam-Evidence '*H*': 0.94; '*S*': 0.00; 'context': 0.07; 'from:addr:ethan': 0.09; 'from:addr:stoneleaf.us': 0.09; 'from:name:ethan furman': 0.09; 'message-id:@stoneleaf.us': 0.09; '~ethan~': 0.09; 'posted': 0.15; 'nans': 0.16; 'operator.': 0.16; 'other,': 0.16; 'simpson': 0.16; 'subject:alternative': 0.16; 'subject:based': 0.16; 'wrote:': 0.18; 'header:User-Agent:1': 0.23; "haven't": 0.24; 'header:In-Reply-To:1': 0.27; "doesn't": 0.30; 'decimal': 0.31; 'extending': 0.31; 'option': 0.32; 'something': 0.35; 'equal': 0.35; 'charset:us-ascii': 0.36; 'possible': 0.36; 'manager': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'rather': 0.38; 'to:addr:python.org': 0.39; 'even': 0.60; 'new': 0.61; 'received:173': 0.61; 'equals': 0.68; 'received:69.56': 0.68; 'day': 0.76; 'float,': 0.84; 'received:69.56.148': 0.84; 'response,': 0.91; 'subject:Proposal': 0.91
Date Thu, 10 Jul 2014 17:34:17 -0700
From Ethan Furman <ethan@stoneleaf.us>
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1
MIME-Version 1.0
To python-list@python.org
Subject Re: context manager based alternative to Re: Proposal: === and !===
References <20140711002036.GA68939@cskk.homeip.net>
In-Reply-To <20140711002036.GA68939@cskk.homeip.net>
Content-Type text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding 7bit
X-AntiAbuse This header was added to track abuse, please include it with any abuse report
X-AntiAbuse Primary Hostname - gator3304.hostgator.com
X-AntiAbuse Original Domain - python.org
X-AntiAbuse Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse Sender Address Domain - stoneleaf.us
X-BWhitelist no
X-Source-IP 173.12.184.233
X-Exim-ID 1X5On3-0003fZ-Vw
X-Source
X-Source-Args
X-Source-Dir
X-Source-Sender ([173.12.184.233]) [173.12.184.233]:35999
X-Source-Auth ethan+stoneleaf.us
X-Email-Count 2
X-Source-Cap dG9idWs7dG9idWs7Z2F0b3IzMzA0Lmhvc3RnYXRvci5jb20=
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.11745.1405040205.18130.python-list@python.org> (permalink)
Lines 15
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1405040205 news.xs4all.nl 2857 [2001:888:2000:d::a6]:50872
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:74334

Show key headers only | View raw


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~

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: context manager based alternative to Re: Proposal: === and !=== Ethan Furman <ethan@stoneleaf.us> - 2014-07-10 17:34 -0700

csiph-web