Issue 16774: Additional recipes for itertools docs (original) (raw)

Created on 2012-12-24 20:40 by kachayev, last changed 2022-04-11 14:57 by admin. This issue is now closed.

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 (8)
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.
msg219128 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-05-26 05:04
New changeset 2781fb146f4a by Raymond Hettinger in branch 'default': Issue 16774: Add a new itertools recipe (suggested by Alexey Kachayev). http://hg.python.org/cpython/rev/2781fb146f4a
msg219129 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2014-05-26 05:05
In the end, I decided to add a variant of take_last(). Thank you for the suggestion.
History
Date User Action Args
2022-04-11 14:57:39 admin set github: 60978
2014-05-26 05:05:16 rhettinger set status: open -> closedresolution: fixedmessages: +
2014-05-26 05:04:09 python-dev set nosy: + python-devmessages: +
2014-05-26 05:02:11 rhettinger set versions: + Python 3.5, - Python 2.7, Python 3.2, Python 3.3, Python 3.4
2013-03-12 03:39:13 rhettinger set priority: normal -> lowmessages: +
2013-01-19 09:31:10 kachayev set messages: +
2013-01-18 19:14:41 serhiy.storchaka set nosy: + serhiy.storchakamessages: +
2013-01-18 15:13:25 kachayev set files: + itertools.doc.v3.diffmessages: +
2012-12-25 21:23:31 kachayev set files: + itertools.doc.v2.diffmessages: +
2012-12-24 20:41:36 ezio.melotti set versions: + Python 2.7, Python 3.2, Python 3.3nosy: + rhettinger, ezio.melottiassignee: docs@python -> rhettingertype: enhancementstage: patch review
2012-12-24 20:40:15 kachayev create