This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author musically_ut
Recipients belopolsky, musically_ut, serhiy.storchaka
Date 2017-05-07.20:58:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> 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 comically more verbose example:

import time
# time.struct_time(tm_year=2005, tm_mon=7, tm_mday=20, tm_hour=14, tm_min=59, tm_sec=56, tm_wday=2, tm_yday=201, tm_isdst=0)

> datetime.datetime has more arguments, and its repr doesn't use keywords.

I think that guessing the meaning of values is much harder when it comes to timedelta.

> Users of datetime.timedelta know what arguments mean. If they don't know they always can look in the documentation or builtin help.

I created the issue after ... a friend ... spent an embarrassing amount of time debugging because he thought that the third argument represented milliseconds and not microseconds. <_<

I could, of course, tell him:

> In the face of ambiguity, resist the temptation to guess.

But he could retort:

> Explicit is better than implicit.


> Readability counts.

I think he has a point.
Date User Action Args
2017-05-07 20:58:19musically_utsetrecipients: + musically_ut, belopolsky, serhiy.storchaka
2017-05-07 20:58:19musically_utsetmessageid: <>
2017-05-07 20:58:19musically_utlinkissue30302 messages
2017-05-07 20:58:19musically_utcreate