[Python-ideas] bool(datetime.time(0, 0))
Antoine Pitrou
solipsis at pitrou.net
Tue May 8 11:56:26 CEST 2012
On Tue, 8 May 2012 17:02:04 +1000
Nick Coghlan <ncoghlan at gmail.com> wrote:
>
> IMO, you've completely misdiagnosed the source of that bug. Never
> *ever* rely on boolean evaluation when testing against None.
Nick, that's just plain silly. If we didn't want people to rely on
boolean evaluation, we wouldn't define __bool__ at all (or we would
make it return a random value).
Regards
Antoine.
More information about the Python-ideas
mailing list