A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-November/049761.html below:

PEP 336, "Make None Callable", by Andrew McClelland

[Python-Dev] Re: PEP 336, "Make None Callable", by Andrew McClellandTim Peters tim.peters at gmail.com
Thu Nov 4 04:25:41 CET 2004
[Anthony Baxter]
>> Abstract
>>
>>     None should be a callable object that when called with any
>>     arguments has no side effect and returns None.

> My response to this is simply "yuck". This is a hack, abd I
> don't think it's worthwhile.

Maybe it's not a coincidence that it's listed in the PEP index next to
"Reject Foolish Indentation" <0.9 wink>.

IMO, it's worse than not worthwhile:  it would be actively bad to
implement this.

    TypeError: 'NoneType' object is not callable

is a frequent runtime occurrence now, and performs a valuable service
when it happens by correctly pointing out a programming error. 
Python's None isn't meant to be neutral -- it's meant to mean "nothing
is there", and supplying nothing where something is required is a
logic error.
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4