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


Groups > comp.lang.python > #27171

Re: type(None)()

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!feeder2.ecngs.de!ecngs!feeder.ecngs.de!xlned.com!feeder7.xlned.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!194.109.133.84.MISMATCH!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; 'raises': 0.07; 'python': 0.09; 'instance.': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:None': 0.09; 'aug': 0.13; 'from:addr:behnel.de': 0.16; 'from:addr:stefan_ml': 0.16; 'from:name:stefan behnel': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:type': 0.16; 'instance,': 0.17; 'stefan': 0.17; '>>>': 0.18; 'second': 0.24; 'linux': 0.24; 'machine': 0.24; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'language.': 0.27; 'header:X -Complaints-To:1': 0.28; 'skip:( 20': 0.28; 'behaviour': 0.29; 'steven': 0.29; 'error': 0.30; 'received:84': 0.32; 'to:addr :python-list': 0.33; 'received:org': 0.36; 'but': 0.36; "didn't": 0.36; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'more': 0.63; 'received:arcor-ip.net': 0.84; 'received:pools.arcor-ip.net': 0.84
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Stefan Behnel <stefan_ml@behnel.de>
Subject Re: type(None)()
Date Thu, 16 Aug 2012 17:31:16 +0200
References <502cebf4$0$6905$e4fe514c@news2.news.xs4all.nl> <502cfc78$0$29978$c3e8da3$5496439d@news.astraweb.com>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host dslb-084-056-027-041.pools.arcor-ip.net
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120714 Thunderbird/14.0
In-Reply-To <502cfc78$0$29978$c3e8da3$5496439d@news.astraweb.com>
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.3369.1345131098.4697.python-list@python.org> (permalink)
Lines 18
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1345131098 news.xs4all.nl 6906 [2001:888:2000:d::a6]:35779
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:27171

Show key headers only | View raw


Steven D'Aprano, 16.08.2012 15:58:
>>> NoneType raises an error if you try to create a second instance.
> In my opinion, this is a PITA for None and better behaviour would be to 
> return the pre-existing NoneType instance, but I didn't design the 
> language.

The time machine strikes again.

Python 3.3.0b1 (default:f7b59e890e30, Aug 11 2012, 05:30:10)
[GCC 4.6.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> type(None)()
>>> print(type(None)())
None

Stefan

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


Thread

type(None)() Hans Mulder <hansmu@xs4all.nl> - 2012-08-16 14:47 +0200
  Re: type(None)() Laszlo Nagy <gandalf@shopzeus.com> - 2012-08-16 14:54 +0200
  Re: type(None)() Chris Angelico <rosuav@gmail.com> - 2012-08-16 23:37 +1000
  Re: type(None)() Ian Kelly <ian.g.kelly@gmail.com> - 2012-08-16 07:56 -0600
  Re: type(None)() Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-08-16 13:58 +0000
    Re: type(None)() Stefan Behnel <stefan_ml@behnel.de> - 2012-08-16 17:31 +0200
    Re: type(None)() Stefan Behnel <stefan_ml@behnel.de> - 2012-08-16 17:44 +0200
    Re: type(None)() Ethan Furman <ethan@stoneleaf.us> - 2012-08-16 09:06 -0700
  Re: type(None)() Robert Kern <robert.kern@gmail.com> - 2012-08-16 15:56 +0100
  Re: type(None)() MRAB <python@mrabarnett.plus.com> - 2012-08-16 16:13 +0100
  Re: type(None)() Ethan Furman <ethan@stoneleaf.us> - 2012-08-16 09:07 -0700

csiph-web