[Python-ideas] change NoneType, NotImplementedType, & ellipses to return the appropriate singleton
aquavitae69 at gmail.com
Sun Aug 7 18:37:27 CEST 2011
Is there any reason not to allow similar behaviour for True and False? i.e.
True() == True
On Aug 7, 2011 3:39 PM, "Georg Brandl" <g.brandl at gmx.net> wrote:
> Well, I wouldn't use it for anything.
> Am 07.08.2011 15:07, schrieb Devin Jeanpierre:
>> Does it? What else would you use type(None) for? An isinstance() check?
>> On Sun, Aug 7, 2011 at 4:12 AM, Georg Brandl <g.brandl at gmx.net> wrote:
>>> Am 07.08.2011 01:34, schrieb dag.odenhall at gmail.com:
>>>> On 29 July 2011 19:03, Guido van Rossum <guido at python.org> wrote:
>>>>> I think it is fine if type(None)() returns None instead of raising an
>>>> +1, I've often wanted it and felt (lambda: None) was somewhat clunky.
>>> It makes its intent much clearer than type(None) though.
>>> Python-ideas mailing list
>>> Python-ideas at python.org
> Python-ideas mailing list
> Python-ideas at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas