[issue9169] Deprecate use of more than 3 positional arguments in timedelta constructor

2010-07-13 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue9169] Deprecate use of more than 3 positional arguments in timedelta constructor

2010-07-06 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > As a matter of good style, though, I'd still like to see all uses of > timedelta in the standard library and documentation use the keywords > explicitly ... It is a bit of a shame, but there are exactly 3 places using timedelta in stdlib: Lib/_strptim

[issue9169] Deprecate use of more than 3 positional arguments in timedelta constructor

2010-07-06 Thread Mark Dickinson
Changes by Mark Dickinson : -- status: open -> pending ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue9169] Deprecate use of more than 3 positional arguments in timedelta constructor

2010-07-06 Thread Mark Dickinson
Mark Dickinson added the comment: I supported this idea when Alexander brought it up in IRC. On reflection, I think Antoine is right, though: deprecations aren't something to be done lightly. As a matter of good style, though, I'd still like to see all uses of timedelta in the standard lib

[issue9169] Deprecate use of more than 3 positional arguments in timedelta constructor

2010-07-06 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- priority: normal -> low resolution: -> rejected status: open -> pending ___ Python tracker ___ __

[issue9169] Deprecate use of more than 3 positional arguments in timedelta constructor

2010-07-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I would think that deprecating error-prone constructs is well within > normal library evolution. For example, several interfaces that > accepted floats by truncating them to ints were deprecated in the > past. That's because silent truncation to int will lea

[issue9169] Deprecate use of more than 3 positional arguments in timedelta constructor

2010-07-05 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Mon, Jul 5, 2010 at 1:39 PM, Antoine Pitrou wrote: .. > -1 from me. Deprecating correct code should be done for serious > reasons, not aesthetical (i.e. gratuitous) ones. I would think that deprecating error-prone constructs is well within normal lib

[issue9169] Deprecate use of more than 3 positional arguments in timedelta constructor

2010-07-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: > This would be a backward incompatible change, so it would need to go > through a deprecation process, but I think someone writing > > HOUR = timedelta(0, 0, 0, 0, 0, 1) > > or > > WEEK = timedelta(0, 0, 0, 0, 0, 0, 1) > > deserves a deprecation warning. -

[issue9169] Deprecate use of more than 3 positional arguments in timedelta constructor

2010-07-05 Thread Alexander Belopolsky
New submission from Alexander Belopolsky : Prior to r82454, python implementation of timedelta had the following comment: class timedelta: def __new__(cls, days=0, seconds=0, microseconds=0, # XXX The following should only be used as keyword args: