[Python-ideas] bool(datetime.time(0, 0))
Stephen J. Turnbull
stephen at xemacs.org
Wed May 9 03:42:42 CEST 2012
Ethan Furman writes:
> But not money. ;) positive is money I have, negative is money I owe,
> and zero is nothing.
Accountants and economists take exception. Unless you live on a
desert island with Friday, an aggregate zero is an accident, just like
a Poisson arrival at exactly midnight is an accident.
On the other hand, there are zeros that are None in accounting, but
they are *always* associated with a real zero (no sales of an item, no
production, worker absent, ...).
I have to admit I find Terry's circular reasoning[1] compelling as an
ex ante argument, but looking at the clock I discover it's ex post.
And it's really not that big a deal; if a factory function is
documented to return None, the test *should* be "x is not None", not
"bool(x)".
Footnotes:
[1] Sorry, Terry, I couldn't resist!
More information about the Python-ideas
mailing list