Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #10482
| References | <4E3182C3.9040306@stoneleaf.us> <CALwzidmRwWqS-nY3==8XetBMe2cS7DRikZ6OWOwbQ61w99X9tg@mail.gmail.com> <4E31CE8F.4080606@stoneleaf.us> |
|---|---|
| Date | 2011-07-29 07:16 +1000 |
| Subject | Re: NoneType and new instances |
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1594.1311887809.1164.python-list@python.org> (permalink) |
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.
ChrisA
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Re: NoneType and new instances Chris Angelico <rosuav@gmail.com> - 2011-07-29 07:16 +1000 Re: NoneType and new instances Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-07-29 11:29 +1000
csiph-web