[Python-ideas] change NoneType, NotImplementedType, & ellipses to return the appropriate singleton

Stefan Behnel stefan_ml at behnel.de
Sun Aug 7 18:51:41 CEST 2011


David Townshend, 07.08.2011 18:37:
> Is there any reason not to allow similar behaviour for True and False? i.e.
> True() == True

That's not similar at all. But we already have

     >>> type(True)()
     False

which, written in a less surprising way, gives

     >>> type(False)()
     False

Stefan




More information about the Python-ideas mailing list