Utkarsh Upadhyay added the comment: > [...] the extra information may be helpful the first time you see it, but if > you deal with timedeltas a lot, it would quickly become annoying.
It seems from the discussion on the issue that there are two kinds of developers: - One group which uses timedeltas so often that they will find it annoying if the repr was longer, which takes up more screen space. - The other group which occasionally uses timedelta but may forget what the arguments stood for. I suspect that the distribution of programmers who use timedeltas binned by their frequency of usage will follow the Pareto principle: only 20% of the developers will account for 80% of uses of timedelta, and the remaining 80% of the developers will use it the remaining 20% of the time. Out of those 80% developers who use it sparingly, some fraction will find the repr with the keywords more informative than the current version and be a tiny bit happier. I personally belong to the second group of developers. IMHO, Guido too may belong the second group https://marc.info/?l=python-dev&m=145066335824146&w=2 : > Well it would have saved me an embarrassing moment -- I typed > `datetime.timedelta(seconds=1e6)` at the command prompt and when the response > came as `datetime.timedelta(11, 49600)` I mistook that as 11 years (I was in > a hurry and trying hard not to have to think :-). @haypo: in the same mail, Guido also talks (jokes?) about improving timedeltas from grounds up: > I might still go for it [i.e. changing the attributes], if it wasn't too late > by over a decade (as Tim says). :) Though I think the discussion there stopped before anyone could raise the objection about verbosity and clarity, Guido, IMO, was optimistic about this change: > I still think the repr change to use keywords has a good chance for 3.6. https://marc.info/?l=python-dev&m=145073617109654&w=2 ~ ut ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue30302> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com