Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #10486 > unrolled thread
| Started by | Ethan Furman <ethan@stoneleaf.us> |
|---|---|
| First post | 2011-07-28 15:10 -0700 |
| Last post | 2011-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.
Re: NoneType and new instances Ethan Furman <ethan@stoneleaf.us> - 2011-07-28 15:10 -0700
| From | Ethan Furman <ethan@stoneleaf.us> |
|---|---|
| Date | 2011-07-28 15:10 -0700 |
| Subject | Re: 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~
Back to top | Article view | comp.lang.python
csiph-web