Message294062
I think the benefit of the repr being easier to understand outweighs the pain of breaking the old format. If the change is a problem, that might be mitigated by adding an entry to the “Porting to Python 3.7” documentation.
I don’t think my option of factoring the minus sign out to the front of the timedelta constructor was mentioned on Python-dev. The advantage is that it doesn’t mention problematic negative attribute values, and if you negate a timedelta, you still get the right attribute values:
>>> d
-datetime.timedelta(seconds=60)
>>> -d
datetime.timedelta(seconds=60)
>>> (-d).seconds
60 |
|
Date |
User |
Action |
Args |
2017-05-21 00:20:25 | martin.panter | set | recipients:
+ martin.panter, belopolsky, serhiy.storchaka, musically_ut |
2017-05-21 00:20:25 | martin.panter | set | messageid: <1495326025.85.0.714312567977.issue30302@psf.upfronthosting.co.za> |
2017-05-21 00:20:25 | martin.panter | link | issue30302 messages |
2017-05-21 00:20:24 | martin.panter | create | |
|