14 Apr
2013
14 Apr
'13
4:58 a.m.
On 13.04.13 22:21, Terry Jan Reedy wrote:
On 4/13/2013 2:24 PM, Peter Norvig wrote:
Beginners will often write code like this:
if val > 0: return +1 elif val < 0: return -1 elif val == 0: return 0
So might a Python expert who knows that all three tests could return False for instances of some class. For instance, a fuzzy zero, or an interval that includes 0.
Or float('nan').