[Datetime-SIG] Another round on error-checking
alexander.belopolsky at gmail.com
Thu Sep 3 17:57:14 CEST 2015
On Thu, Sep 3, 2015 at 11:42 AM, Carl Meyer <carl at oddbird.net> wrote:
> There is an alternative solution available that avoids this problem, and
> all other inconsistencies.
Really? PEP 495 has a more or less complete reference implementation in my
github fork  of cpython. I have recently added the hash invariant
preservation rule which required a change to the grand total of two lines
in datetime.py. Something that is that easy to implement cannot be too
hard to explain and document.
I would like to specifically point out that the only existing unit test
that my patch has to modify is the one which checks that astimezone()
method raises an exception on a naive datetime.
I have not seen any "alternative solution" implemented anywhere. If you
have not tried it yourself - trust me - keeping 4000+ lines of unit tests
intact while adding features to the datetime module is not an easy task.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Datetime-SIG