Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!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.027 X-Spam-Evidence: '*H*': 0.95; '*S*': 0.00; 'am,': 0.13; 'wrote:': 0.15; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'lambda': 0.16; 'def': 0.16; 'received:209.85.210.174': 0.19; 'received:mail-iy0-f174.google.com': 0.19; 'header:In-Reply-To:1': 0.22; "shouldn't": 0.23; 'pass': 0.28; 'fri,': 0.28; 'message- id:@mail.gmail.com': 0.28; 'explicitly': 0.29; "it'd": 0.30; "i'll": 0.33; 'to:addr:python-list': 0.34; 'none': 0.35; 'probably': 0.35; 'subject:new': 0.36; 'useful': 0.37; 'but': 0.37; 'received:google.com': 0.38; 'received:209.85': 0.38; 'subject:: ': 0.38; 'returning': 0.38; 'to:addr:python.org': 0.39; 'received:209': 0.40 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=e2woBqi+6XuGiriY0SWAWMLE0GiTyB/cH9DJ/Yskioo=; b=sl2POrh6mTcx/f6tqWC8tjTQcEHOqFe4wS80/0X443QCnMwD8YybhVAMWjrbnV81C1 9Tgbl96OusH8rwha0i8XPaHUrSN1k8He3PIZsayuL1msjbD4CyvnQ9oowFiKf5WGxzn6 zdVFtWcrWVqrj80g+tqJMhf8sx65CPBhs2wn0= MIME-Version: 1.0 In-Reply-To: <4E31CE8F.4080606@stoneleaf.us> References: <4E3182C3.9040306@stoneleaf.us> <4E31CE8F.4080606@stoneleaf.us> Date: Fri, 29 Jul 2011 07:16:46 +1000 Subject: Re: NoneType and new instances From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: 1311887809 news.xs4all.nl 23897 [2001:888:2000:d::a6]:57567 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:10482 On Fri, Jul 29, 2011 at 7:03 AM, Ethan Furman wrote: > I'll use a lambda to get around it, but that's not very elegant. =A0Why > shouldn't NoneType be able to return the singleton None? Why a lambda? def ThisFunctionWillReturnNone(): pass Although, since the returning of None is crucial to it, it'd probably be better to explicitly "return None". But minimalist useful functions are amusing. ChrisA