Message106206
I think this should be rejected. The OP's premise was that t.timetuple()[7] was unreadable, but in the modern python, the same can be written as t.timetuple().tm_yday. The later is only slightly less readable than the proposed t.yday().
For the other half of the proposal, Marc-Andre's mxDate code translates into only slightly more complicated stdlib datetime code:
def date_fromyday(year, yday):
return date(year, 1, 1) + timedelta(yday - 1) |
|
Date |
User |
Action |
Args |
2010-05-20 23:17:47 | belopolsky | set | recipients:
+ belopolsky, lemburg, mark.dickinson, pitrou, mwtoews, jborgohain |
2010-05-20 23:17:47 | belopolsky | set | messageid: <1274397467.31.0.643844939306.issue1436346@psf.upfronthosting.co.za> |
2010-05-20 23:17:45 | belopolsky | link | issue1436346 messages |
2010-05-20 23:17:45 | belopolsky | create | |
|