[Python-Dev] Negative times behaviour in itertools.repeat for Python maintenance releases (2.7, 3.3 and maybe 3.4) (original) (raw)

Vajrasky Kok sky.kok at speaklikeaking.com
Mon Jan 27 05:21:19 CET 2014


On Mon, Jan 27, 2014 at 12:02 PM, Nick Coghlan <ncoghlan at gmail.com> wrote:

That is, I'm OK with either not backporting anything at all, or backporting the full change. The only idea I object to is the one of removing the infinite iteration capability without providing a replacement spelling for it.

Is repeat('a') (omitting times argument) not a replacement spelling for it?

What about this alternative? Makes -1 consistently mean unlimited repetition and other negative numbers consistently mean zero repetitions then document this behaviour. Just throwing suggestion. I am not so keen to it, though.



More information about the Python-Dev mailing list