Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #10486
| Date | 2011-07-28 15:10 -0700 |
|---|---|
| From | Ethan Furman <ethan@stoneleaf.us> |
| Subject | Re: NoneType and new instances |
| References | <4E3182C3.9040306@stoneleaf.us> <CALwzidmRwWqS-nY3==8XetBMe2cS7DRikZ6OWOwbQ61w99X9tg@mail.gmail.com> <4E31CE8F.4080606@stoneleaf.us> <CAPTjJmokCXXwznu3Dm5msd2qSf+9Yqx_-aJ+6=Q3tukjS4H_BA@mail.gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1596.1311890075.1164.python-list@python.org> (permalink) |
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~
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: NoneType and new instances Ethan Furman <ethan@stoneleaf.us> - 2011-07-28 15:10 -0700
csiph-web