Why is None <= 0

Gregor Horvath gh at gregor-horvath.com
Fri Apr 25 20:59:20 CEST 2008


D'Arcy J.M. Cain schrieb:
> On Fri, 25 Apr 2008 20:27:15 +0200
> Gregor Horvath <gh at gregor-horvath.com> wrote:
>>  >>> None <= 0
>> True
>>
>> Why?
> 
> Why not?

Because, from http://www.python.org/dev/peps/pep-0020/ :

Errors should never pass silently.
In the face of ambiguity, refuse the temptation to guess.

Greg



More information about the Python-list mailing list