[Python-ideas] Please reconsider the Boolean evaluation of midnight
p.f.moore at gmail.com
Thu Mar 6 11:57:22 CET 2014
On 6 March 2014 10:33, M.-A. Lemburg <mal at egenix.com> wrote:
>> It is not a coincidence, IMO, that the three persons arguing that the current behaviour is
>> reasonable are implementors of datetime modules: you, Tim and Alexander. All other people find the
>> behaviour baffling.
> I'm not so sure. Of course, people who have been doing date/time
> stuff will jump into discussions that deal with them, but the same
> argument triggering this thread could have applied to other Python
> types and you would then have a different group of people argue
> for plausibility of the choice.
I had promised to stay out of this discussion as I no longer thing it
adds much value (note that the bug has been reopened long since) and I
was getting tired of having people decide that I'd said something I
But just to add a perspective from someone who *doesn't* develop a
datetime module, I encounter "special" midnight values very often.
Databases (at least Oracle, and I believe others) typically store date
values ("Thursday 6th March 2014") as a timestamp value with midnight
as a time part. So checking the time part of a datetime value for
midnight as a "special, means omitted" value is not uncommon in that
More information about the Python-ideas