[issue1436346] yday in datetime module
Antoine Pitrou
report at bugs.python.org
Wed Aug 5 12:52:50 CEST 2009
Antoine Pitrou <pitrou at free.fr> added the comment:
Some comments:
- since there is already a weekday() method, the new method should be
called yearday() rather than yday()
- ditto for fromyday(): fromyearday() would be better
- Modules/datetimemodule.c should only be indented with tabs, but your
patch indents it with spaces in some places
- the algorithm in date_fromyday() looks suboptimal: if you repeatedly
call days_in_month(), you shouldn't have to call days_before_month() at
the end, you can compute it by yourself
I haven't tested the patch yet.
Marc-André, do you have any take on the principle of this?
----------
nosy: +lemburg
stage: test needed -> patch review
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1436346>
_______________________________________
More information about the Python-bugs-list
mailing list