On Wed, Dec 12, 2012 at 12:58 PM, Barry Warsaw <ba...@python.org> wrote:
> On Dec 11, 2012, at 04:23 PM, Lennart Regebro wrote: > > >A new ``is_dst`` parameter is added to several of the `tzinfo` methods to > >handle time ambiguity during DST changeovers. > > >``None`` will raise an ``AmbiguousTimeError`` exception if the time > specified > >was during a DST change over. It will also raise a > ``NonExistentTimeError`` > >if a time is specified during the "missing time" in a change to DST. > > I think None should be the default. > 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). Cheers, Nick. -- Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia
_______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com