[issue9944] Typo in doc for itertools recipe of consume

2010-09-25 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

Thanks, fixed in r85008.

--
nosy: +georg.brandl
resolution:  - fixed
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9944
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9944] Typo in doc for itertools recipe of consume

2010-09-24 Thread Jon Clements

New submission from Jon Clements jon...@googlemail.com:

Very low priority.

def consume(iterator, n):
Advance the iterator n-steps ahead. If n is none, consume entirely.
# Use functions that consume iterators at C speed.
if n is None:
# feed the entire iterator into a zero-length deque
collections.deque(iterator, maxlen=0)
else:
# advance to the emtpy slice starting at position n
next(islice(iterator, n, n), None)

Hardly a show stoppper, and not me worth submitting a patch, but emtpy should 
be empty. Just thought I'd make note of it before I forgot.

--
assignee: d...@python
components: Documentation
messages: 117339
nosy: d...@python, joncle
priority: normal
severity: normal
status: open
title: Typo in doc for itertools recipe of consume
versions: Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9944
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com