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


Groups > comp.lang.python > #10486 > unrolled thread

Re: NoneType and new instances

Started byEthan Furman <ethan@stoneleaf.us>
First post2011-07-28 15:10 -0700
Last post2011-07-28 15:10 -0700
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: NoneType and new instances Ethan Furman <ethan@stoneleaf.us> - 2011-07-28 15:10 -0700

#10486 — Re: NoneType and new instances

FromEthan Furman <ethan@stoneleaf.us>
Date2011-07-28 15:10 -0700
SubjectRe: NoneType and new instances
Message-ID<mailman.1596.1311890075.1164.python-list@python.org>
Chris Angelico wrote:
> On Fri, Jul 29, 2011 at 7:03 AM, Ethan Furman <ethan@stoneleaf.us> wrote:
>> I'll use a lambda to get around it, but that's not very elegant.  Why
>> 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.

More amusing still:

def NoneType():
     "Returns None"

~Ethan~

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web