[Python-checkins] r69522 - in python/trunk: Doc/library/itertools.rst Lib/test/test_itertools.py Misc/NEWS Modules/itertoolsmodule.c

Nick Coghlan ncoghlan at gmail.com
Thu Feb 12 12:01:37 CET 2009


raymond.hettinger wrote:
> Modified: python/trunk/Doc/library/itertools.rst
> ==============================================================================
> --- python/trunk/Doc/library/itertools.rst	(original)
> +++ python/trunk/Doc/library/itertools.rst	Thu Feb 12 06:39:46 2009
> @@ -200,20 +200,23 @@
> .. versionadded:: 2.7
>>> -.. function:: count([n])
> +.. function:: count(n=0, step=1)
>> - Make an iterator that returns consecutive integers starting with *n*. If not
> - specified *n* defaults to zero. Often used as an argument to :func:`imap` to
> - generate consecutive data points. Also, used with :func:`izip` to add sequence
> - numbers. Equivalent to::
> + Make an iterator that returns evenly spaced values starting with *n*. Often
> + used as an argument to :func:`imap` to generate consecutive data points.
> + Also, used with :func:`izip` to add sequence numbers. Equivalent to::
>> - def count(n=0):
> + def count(n=0, step=1):
> # count(10) --> 10 11 12 13 14 ...
> + # count(2.5, 0.5) -> 3.5 3.0 4.5 ...

Something appears to have gone a little wrong with the float example in
that comment...
Cheers,
Nick.
-- 
Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
---------------------------------------------------------------


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /