[Python-ideas] bool(datetime.time(0, 0))

Antoine Pitrou solipsis at pitrou.net
Tue May 8 12:11:04 CEST 2012


Le mardi 08 mai 2012 à 20:08 +1000, Nick Coghlan a écrit :
> The problem is not using boolean evaluation - it's assuming that
> boolean evaluation is defined as "x is not None". Doing so introduces
> a completely unnecessary dependency on the type of "x".

Well, the dependency is obvious when the type is already well-known.

Regards

Antoine.





More information about the Python-ideas mailing list