[Datetime-SIG] Another round on error-checking

Alexander Belopolsky alexander.belopolsky at gmail.com
Mon Aug 31 21:23:59 CEST 2015


On Mon, Aug 31, 2015 at 3:07 PM, Tim Peters <tim.peters at gmail.com> wrote:

> At a high level, I'm questioning the "_never_ raise an exception" PEP
> 495 behavior.  It grates. "Errors should never pass silently" and
> such.
>

But these are not errors!  As I mentioned before, it was bad PR on my part
to call datetimes in the gaps or with ignorable fold=1 "invalid."  I should
have called them "denormalized."  I believe many aware datetime
manipulation algorithms can benefit from having denormalized instances as
intermediate values and being able to call .utcoffset() and friends on such
instances.

My primary use case is the "naive scheduler" which gives you no means to
schedule anything with fold=1 and if you give it 02:45 AM in the gap it
will silently take it for 03:45 AM.   As long as it displays the correct
time in every reminder, I don't care that it did to chastise me for not
knowing about the DST gap.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/datetime-sig/attachments/20150831/15ecf402/attachment.html>


More information about the Datetime-SIG mailing list