[issue30302] Improve .__repr__ implementation for datetime.datetime.timedelta

2017-05-07 Thread Utkarsh Upadhyay
Utkarsh Upadhyay added the comment: > The drawback is that this change increases the length of the repr. I would argue that it is a reasonable trade-off given the increase in ease of understanding. I know that this is a weak argument, but, keywords are not without precedent. Consider the com

[issue30302] Improve .__repr__ implementation for datetime.datetime.timedelta

2017-05-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The drawback is that this change increases the length of the repr. If you output few values in a row (for example output the repr of a list of timedeltas), this makes the output less readable. Users of datetime.timedelta know what arguments mean. If they don

[issue30302] Improve .__repr__ implementation for datetime.datetime.timedelta

2017-05-07 Thread Utkarsh Upadhyay
Changes by Utkarsh Upadhyay : -- pull_requests: +1595 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue30302] Improve .__repr__ implementation for datetime.datetime.timedelta

2017-05-07 Thread Utkarsh Upadhyay
New submission from Utkarsh Upadhyay: Currently, the default implementation of datetime.datetime.__repr__ (the default output string produced at the console/IPython) gives a rather cryptic output: from datetime import datetime as D D.fromtimestamp(1390953543.1) - D.fromtimestamp(1121871596) #