On Tue, Dec 22, 2015 at 7:39 PM, Victor Stinner <victor.stin...@gmail.com> wrote: > Le lundi 21 décembre 2015, Guido van Rossum <gvanros...@gmail.com> a écrit : >> >> I still think the repr change to use keywords has a good chance for 3.6. > > repr() with keywords is called a method, no? Like isoformat() >
Not keyword arguments - the proposal is to change the repr from one format to another. Currently, the repr indicates a constructor call using positional arguments: >>> datetime.timedelta(1) datetime.timedelta(1) >>> datetime.timedelta(1,2) datetime.timedelta(1, 2) >>> datetime.timedelta(1,2,3) datetime.timedelta(1, 2, 3) >>> datetime.timedelta(1,2,3,4) datetime.timedelta(1, 2, 4003) The proposal is to make it show keyword args instead: >>> datetime.timedelta(days=1) datetime.timedelta(days=1) >>> datetime.timedelta(days=1,seconds=2) datetime.timedelta(days=1, seconds=2) >>> datetime.timedelta(days=1,seconds=2,microseconds=3) datetime.timedelta(days=1, seconds=2, microseconds=3) >>> datetime.timedelta(days=1,seconds=2,microseconds=3,milliseconds=4) datetime.timedelta(days=1, seconds=2, microseconds=4003) ChrisA _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com