classification
Title: Additional recipes for itertools docs
Type: enhancement Stage: patch review
Components: Documentation Versions: Python 3.4, Python 3.3, Python 3.2, Python 2.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: rhettinger Nosy List: asvetlov, docs@python, ezio.melotti, kachayev, rhettinger, serhiy.storchaka
Priority: low Keywords: patch

Created on 2012-12-24 20:40 by kachayev, last changed 2013-03-12 03:39 by rhettinger.

Files
File name Uploaded Description Edit
itertools.doc.diff kachayev, 2012-12-24 20:40 review
itertools.doc.v2.diff kachayev, 2012-12-25 21:23 Updated review
itertools.doc.v3.diff kachayev, 2013-01-18 15:13 fixed review
Messages (6)
msg178098 - (view) Author: Alexey Kachayev (kachayev) * Date: 2012-12-24 20:40
Additional recipes for itertools documentation (widespread functions in other programming languages):
* drop
* split-at
* split-by
msg178164 - (view) Author: Alexey Kachayev (kachayev) * Date: 2012-12-25 21:23
Added:
* takelast
* droplast
msg180196 - (view) Author: Alexey Kachayev (kachayev) * Date: 2013-01-18 15:13
Updated patch with:
* fix error in islice function name
* made n=None default second argument for consume(iterator, n=None) cause it provides specific behavior when n is None which can be assumed as default for function
msg180212 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2013-01-18 19:14
How are popular the proposed recipes? Not every possible combination of functions is worth to mention in the documentation.
msg180237 - (view) Author: Alexey Kachayev (kachayev) * Date: 2013-01-19 09:31
It's hard to evaluate how popular given recipes, but:
* drop is opposite to take, so it's as popular as take
* the same situation with splitat, splitby - it's one case of partition that's hard to write each time with enumerator (partition is already in documentation)
* takelast, droplast was added cause itertools.islice doesn't support negative indices (which is ok). both functions have not obvious implementation - I'm sure that recipes will be good example for users how to work with iterators even if concrete functions aren't so widely-spreaded
msg184004 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2013-03-12 03:39
I will add drop() to the recipes and possibly take_last() which I would rename add tail().

Sorry, I don't have interest in the others.  I don't find them instructive or very useful.
History
Date User Action Args
2013-03-12 03:39:13rhettingersetpriority: normal -> low

messages: + msg184004
2013-01-19 09:31:10kachayevsetmessages: + msg180237
2013-01-18 19:14:41serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg180212
2013-01-18 15:13:25kachayevsetfiles: + itertools.doc.v3.diff

messages: + msg180196
2012-12-25 21:23:31kachayevsetfiles: + itertools.doc.v2.diff

messages: + msg178164
2012-12-24 20:41:36ezio.melottisetversions: + Python 2.7, Python 3.2, Python 3.3
nosy: + rhettinger, ezio.melotti

assignee: docs@python -> rhettinger
type: enhancement
stage: patch review
2012-12-24 20:40:15kachayevcreate