On Wed, Dec 12, 2012 at 12:58 PM, Barry Warsaw <barry at 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 | ncoghlan at gmail.com | Brisbane, Australia -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20121212/d9129958/attachment.html>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4