[Python-ideas] Please reconsider the Boolean evaluation of midnight

Shai Berger shai at platonix.com
Thu Mar 6 08:25:26 CET 2014


On Thursday 06 March 2014 14:00:02 Steven D'Aprano wrote:
> tracking down bugs can be difficult, but if somebody is spending "hours"
> trying to debug why "if time_value" sometimes does the wrong thing,
> *without* bothering to read the documentation for time objects to find
> out how they're supposed to behave, then I don't have a lot of sympathy.
> 
This argument keeps repeating. It is a gross misunderstanding of the problem.

The hours are not spent trying to debug why an if went the wrong way. The 
hours are spent trying to understand why some feature of a program doesn't 
work as expected -- *sometimes*. It can easily take hours to try and reproduce 
the wrong behavior, in vain, because it only shows up on unique data; and the 
wrong behavior will often not show itself as "an if went the wrong way", but, 
for example, "sometimes a number here is wrong" -- which happens when the 
calculation of the number goes over a collection of objects and does complex 
things including decisions based on time.

Of course, once you get to the "if" it's relatively easy (surprising behavior 
is still surprising, but less mystifying). It's getting to it that's the 
issue.

Thanks,
	Shai.


More information about the Python-ideas mailing list