<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 5, 2014 at 11:38 AM, Shai Berger <span dir="ltr"><<a href="mailto:shai@platonix.com" target="_blank">shai@platonix.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":4ty" class="a3s" style="overflow:hidden">So, I rephrase my request: Would anybody object to a silent warning issued<br>
whenever a time-object is evaluated as Boolean?</div></blockquote></div><br>I would. Users should not be penalized for using a documented behavior. There are legitimate uses for bool(midnight) being False. Midnight is special in many contexts. For example, it is uncertain whether midnight belongs to the previous or next day. If your application wants to group midnight differently from other times - it is perfectly fine to use "if dt.time()" instead of a more verbose "if dt.time() != datetime.time(0, 0)".</div>
<div class="gmail_extra"><br></div></div>