[Python-ideas] bool(datetime.time(0, 0))
Alexander Belopolsky
alexander.belopolsky at gmail.com
Mon May 7 17:19:04 CEST 2012
On Mon, May 7, 2012 at 11:11 AM, Mark Dickinson <dickinsm at gmail.com> wrote:
>> Steven D'Aprano <steve at pearwood.info> wrote:
>> I fear that backwards compatibility will prevent any change, but I don't see
>> any good reasons for treating any date or time as a false value.
>
> I agree for the date, time and datetime classes.
Can anyone show a use case where the change will result in an
improvement? It seems to me that the issue mostly shows up in the
code like "if t: ..." which would work better with "if t is not None:
...".
More information about the Python-ideas
mailing list