<div class="gmail_quote">On Wed, Dec 12, 2012 at 12:58 PM, Barry Warsaw <span dir="ltr"><<a href="mailto:barry@python.org" target="_blank">barry@python.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Dec 11, 2012, at 04:23 PM, Lennart Regebro wrote:<br>
<br>
</div><div class="im">>A new ``is_dst`` parameter is added to several of the `tzinfo` methods to<br>
>handle time ambiguity during DST changeovers.<br>
<br>
</div><div class="im">>``None`` will raise an ``AmbiguousTimeError`` exception if the time specified<br>
>was during a DST change over. It will also raise a ``NonExistentTimeError``<br>
>if a time is specified during the "missing time" in a change to DST.<br>
<br>
</div>I think None should be the default.<br></blockquote><div><br clear="all"></div></div>That's a backwards compatibility risk, though - many applications are likely coping just fine with the slightly corrupted time values, but would fall over if an exception was raised instead. The default should probably be chosen so that the single argument form of these calls continues to behave the same in 3.4 as it does in 3.3, emitting a DeprecationWarning to say that the default behaviour is going to change in 3.5 (so the *actual* default would be sentinel value, in order to tell the difference between an explicit True being passed and relying on the default behaviour).<br>
<br><br>Cheers,<br>Nick.<br><br>-- <br>Nick Coghlan   |   <a href="mailto:ncoghlan@gmail.com">ncoghlan@gmail.com</a>   |   Brisbane, Australia<br>