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


Groups > comp.lang.python > #10578

Re: NoneType and new instances

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'method,': 0.07; 'raised': 0.07; 'terry': 0.07; 'python': 0.08; 'default.': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:80.91.229.12': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'received:lo.gmane.org': 0.09; 'exception': 0.12; 'reedy': 0.16; 'jan': 0.19; 'header:In-Reply-To:1': 0.22; 'classes': 0.30; 'none,': 0.30; 'to:addr:python-list': 0.34; 'header:X-Complaints-To:1': 0.34; 'header:User-Agent:1': 0.34; 'there': 0.34; 'accepted': 0.36; 'subject:new': 0.36; 'received:org': 0.38; 'subject:: ': 0.38; 'returning': 0.38; 'header:Mime-Version:1': 0.39; 'to:addr:python.org': 0.39; 'methods': 0.40; 'proposal': 0.67
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Terry Reedy <tjreedy@udel.edu>
Subject Re: NoneType and new instances
Date Sat, 30 Jul 2011 09:35:58 -0400
References <mailman.1575.1311866659.1164.python-list@python.org> <4e320a02$0$29966$c3e8da3$5496439d@news.astraweb.com> <99h9r1FprmU1@mid.individual.net>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host 206.205.249.126
User-Agent Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20110624 Thunderbird/5.0
In-Reply-To <99h9r1FprmU1@mid.individual.net>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://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 <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1655.1312032960.1164.python-list@python.org> (permalink)
Lines 10
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1312032960 news.xs4all.nl 23982 [2001:888:2000:d::a6]:42286
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:10578

Show key headers only | View raw


Ethan's proposal was accepted on python-ideas. In Python 3.3, the 
classes for the singletons None, Ellipsis, and NotImplemented will be 
callables that return the singleton.

It turns out that the reason an exception is now raised is that there 
currently is no .__new__ method, so an exception is raised by default. 
.__new__ methods returning the singleton have been added.

Terry Jan Reedy

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


Thread

NoneType and new instances Ethan Furman <ethan@stoneleaf.us> - 2011-07-28 08:39 -0700
  Re: NoneType and new instances Billy Mays <81282ed9a88799d21e77957df2d84bd6514d9af6@myhashismyemail.com> - 2011-07-28 11:34 -0400
  Re: NoneType and new instances Ben Finney <ben+python@benfinney.id.au> - 2011-07-29 07:46 +1000
    Re: NoneType and new instances Ethan Furman <ethan@stoneleaf.us> - 2011-07-28 15:26 -0700
      Re: NoneType and new instances Ben Finney <ben+python@benfinney.id.au> - 2011-07-29 09:52 +1000
  Re: NoneType and new instances Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-07-29 11:16 +1000
    Re: NoneType and new instances Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2011-07-30 14:50 +1200
      Re: NoneType and new instances Terry Reedy <tjreedy@udel.edu> - 2011-07-30 09:35 -0400
      Re: NoneType and new instances python@bdurham.com - 2011-07-30 11:43 -0400
  Re: NoneType and new instances "bruno.desthuilliers@gmail.com" <bruno.desthuilliers@gmail.com> - 2011-07-30 09:39 -0700
    Re: NoneType and new instances Terry Reedy <tjreedy@udel.edu> - 2011-07-30 23:34 -0400
      Re: NoneType and new instances Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-07-31 14:28 +1000

csiph-web