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

Mark Lawrence breamoreboy at yahoo.co.uk
Mon Jan 27 14:29:28 CET 2014


On 27/01/2014 12:56, Steven D'Aprano wrote:
>
> As it stands now, the documentation is internally contradictory. In
> one part of the documentation, it gives a clear indication that
> "times is None" should select the repeat forever behaviour. In
> another part of the documentation, it fails to mention that None is
> an acceptable value to select the repeat forever behaviour.
>

None is not currently an acceptable value, ValueError is raised if you 
provide anything other than an int in both Python 2.7 and 3.3.  That's 
why I'm against using it to say "run forever" in Python 3.5.

-- 
My fellow Pythonistas, ask not what our language can do for you, ask 
what you can do for our language.

Mark Lawrence



More information about the Python-Dev mailing list