On 07/31/2015 10:16 PM, Tim Peters wrote:
[Alexander Belopolsky]
(I really don't want tz.utcoffset(t) to ever raise an exception)
[Tim]
Me neither.
Why not? If the programmer is using strict tzinfos how would they end up with
an invalid t?
I only see two ways:
- constructing from a literal (in which case an exception should be raised)
- t is using a non-strict or missing tzinfo, possibly from an addition or
subtraction
(in which case we can't know which direction they were going and should not
guess
-- so raise an exception)
--
~Ethan~
_______________________________________________
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/