[Python-Dev] Negative times behaviour in itertools.repeat for Python maintenance releases (2.7, 3.3 and maybe 3.4)
ncoghlan at gmail.com
Mon Jan 27 02:52:41 CET 2014
On 27 Jan 2014 04:44, "Serhiy Storchaka" <storchaka at gmail.com> wrote:
> 26.01.14 19:00, Vajrasky Kok написав(ла):
>> So I hope my argument is convincing enough. We need to fix this bug in
>> Python 2.7, 3.3, and 3.4, by making `times` argument sent via
>> positional or keyword in itertools.repeat ALWAYS means the same thing,
>> which is 0 repetitions.
>> If this is not possible, at the very least, we need to warn this
>> behaviour in the doc.
> I agree with Vajrasky. This is obvious bug and it should be fixed in any
Larry and I were discussing this problem on IRC and the problem is that we
can't remove this behaviour without providing equivalent functionality
under a different spelling.
In 3.5, that will be passing None, rather than -1. For those proposing to
change the maintenance releases, how should a user relying on this
misbehaviour update their code to handle it?
There's also the fact that breaking working code in a maintenance release
is always dubious, especially when there's no current supported way to get
the equivalent behaviour prior to the maintenance release. This is the kind
of change that will require a note in the "porting to Python 3.5" section
of the What's New, again suggesting strongly that we can't change it in the
> Python-Dev mailing list
> Python-Dev at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-Dev