[Alexander Belopolsky] > Whatever your requirements are, the difference between "strict checking" and > PEP 495 code will be the same as between
> dt = get_naive_time() > try: > dt = dt.astimezone() > except AmbiguousTimeError: > # do something > except MissingTimeError: > # do something else > else: > # use dt It's obvious to me what this code means. > and > dt = get_naive_time() > dt0 = dt.replace(fold=0).astimezone() > dt1 = dt.replace(fold=1).astimezone() > if dt1 > dt0: > # do something > elif dt1 < dt0: > # do something else > else: > # use dt0 which is the same as dt1 The only thing that's obvious to me about this code is that it's hacking around something. ijs _______________________________________________ Datetime-SIG mailing list [email protected] https://mail.python.org/mailman/listinfo/datetime-sig The PSF Code of Conduct applies to this mailing list: https://www.python.org/psf/codeofconduct/
