A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2014-January/132114.html below:

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

[Python-Dev] Negative times behaviour in itertools.repeat for Python maintenance releases (2.7, 3.3 and maybe 3.4)Vajrasky Kok sky.kok at speaklikeaking.com
Mon Jan 27 05:26:18 CET 2014
On Mon, Jan 27, 2014 at 12:20 PM, Alexander Belopolsky
<alexander.belopolsky at gmail.com> wrote:
>
> +1
>
> A partial backport will do a disservice to both users and maintainers.

In case we are taking "not backporting anything at all" road, what is
the best fix for the document?

Old
>>> itertools.repeat.__doc__
'repeat(object [,times]) -> create an iterator which returns the
object\nfor the specified number of times.  If not specified, returns
the object\nendlessly.'


New
>>> itertools.repeat.__doc__
'repeat(object [,times]) -> create an iterator which returns the
object\nfor the specified number of times.  If not specified, returns
the object\nendlessly.

If times is specified through positional and negative numbers, it
always means 0 repetitions.
If times is specified through keyword and -1, it means endless
repetition. Other negative numbers for times through keyword should be
avoided.'
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4