Antoine Pitrou <pit...@free.fr> added the comment:

Some comments:

- you also need to modify the C version in Modules/_datetimemodule.c
(make sure the tests exercise both versions!)

- the doc needs a "versionadded" tag

- I don't understand this:

+        if self.isocalendar()[1] != 1:
+            if self.weekday() > 3:  # Jan 1 is not in week one
+                self += timedelta(7 - self.weekday())

What if self.weekday() <= 3 ? Surely some adjustment is needed as well?
(you should probably add more tests to cover the various cases)

- this comment:

+        # Test that we get the OverflowError when the year has 52 weeks

seems wrong since ValueError is raised

----------
nosy: +pitrou

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue14423>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to