(original) (raw)
On 01/28/2014 06:18 AM, Ethan Furman
wrote:
On 01/28/2014 04:37 AM, Steven D'Aprano wrote:
On Mon, Jan 27, 2014 at 10:06:57PM -0800, Larry Hastings wrote:
.. note: if "times" is specified using a keyword argument, and
provided with a negative value, repeat yields the object forever.
This is a bug, its use is unsupported, and this behavior may be
removed in a future version of Python.
How about changing "may be removed" to "will be removed", he asks
hopefully? :-)
+1
See the recent discussion "Deprecation policy" right here in python-dev for a cogent discussion on this issue. I agree with Raymond's view, posted on 1/25:
I think the "times behaves differently when passed by name versus passed by position" behavior falls exactly into this category, and its advice on how to handle it is sound.\* A good use for deprecations is for features that were flat-out misdesignedand prone to error. For those, there is nothing wrong with deprecating themright away. Once deprecated though, there doesn't need to be a rush toactually remove it -- that just makes it harder for people with currentlyworking code to upgrade to newer versions of Python.
\* When I became a core developer well over a decade ago, I was a littledeprecation happy (old stuff must go, keep everything nice and clean, etc).What I learned though is that deprecations are very hard on users and thatthe purported benefits usually aren't really important.
Cheers,
/arry