[Python-ideas] bool(datetime.time(0, 0))
Antoine Pitrou
solipsis at pitrou.net
Tue May 8 12:53:42 CEST 2012
On Tue, 08 May 2012 12:34:32 +0200
"M.-A. Lemburg" <mal at egenix.com> wrote:
>
> Fully agreed.
>
> The above code is just plain wrong and often causes problems
> in larger applications - besides, it's also slower in most
> cases, esp. if determining the length of an object or
> converting it to a numeric value is slow.
>
> If you want to test for None return values, you need to use
> "if is None" or "if is not None".
So who writes the PEP to deprecate __bool__ methods wholesale?
Regards
Antoine.
More information about the Python-ideas
mailing list