Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.012 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'constructor': 0.07; '(actually': 0.09; 'bool': 0.09; 'false,': 0.09; 'am,': 0.13; 'wrote:': 0.15; '9:39': 0.16; 'instantiate': 0.16; 'cc:addr :python-list': 0.16; 'this:': 0.16; 'cc:2**0': 0.21; 'header:In- Reply-To:1': 0.22; 'thu,': 0.28; 'message-id:@mail.gmail.com': 0.28; 'cc:addr:python.org': 0.30; 'unable': 0.31; 'received:209.85.161.46': 0.34; 'received:mail- fx0-f46.google.com': 0.34; 'things': 0.34; 'none': 0.35; 'subject:new': 0.36; 'but': 0.37; 'received:google.com': 0.38; 'received:209.85.161': 0.38; 'received:209.85': 0.38; 'subject:: ': 0.38; 'returning': 0.38; 'received:209': 0.40; 'ever': 0.65; 'them:': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=iP2pObvU2hTJdVpZWeuvgI//R11dUCiFnb0YjLeHBCM=; b=SytRQsgfq/BUz2x7zJM4dqav39HSE4E8cEE+162nYMl6E1ANZ2VpRARvVmrnsPh9CS eDgczPgNR1hCZfADgxyuMF2MUrZGvcHVarRyTadWfknOjH6MGg/zBEcbMyxNaqX4+ME9 solibkIHE1deVnXYIsV1SwpS4HLnMMxS2h1yk= MIME-Version: 1.0 In-Reply-To: <4E3182C3.9040306@stoneleaf.us> References: <4E3182C3.9040306@stoneleaf.us> From: Ian Kelly Date: Thu, 28 Jul 2011 11:12:13 -0600 Subject: Re: NoneType and new instances To: Ethan Furman Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Python X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 14 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1311873164 news.xs4all.nl 23920 [2001:888:2000:d::a6]:50388 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:10466 On Thu, Jul 28, 2011 at 9:39 AM, Ethan Furman wrote: > Why is NoneType unable to produce a None instance? =A0I realise that None= is a > singleton, but so are True and False, and bool is able to handle returnin= g > them: The bool constructor works (actually just returns one of the existing singletons) so that you can do things like this: truth_value =3D bool(x + 5) return my_dict[truth_value] Why would you ever need to instantiate NoneType?