summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2003-12-06 16:23:06 (GMT)
committerRaymond Hettinger <python@rcn.com>2003-12-06 16:23:06 (GMT)
commitd25c1c635164daa5c300342ac99c0810fd9b575c (patch)
treedf412ba3ffaa8fee35e2e12f96aab0beecdaaec0 /Misc
parentb8d5f245b7077d869121835ed72656ac14962ef0 (diff)
downloadcpython-d25c1c635164daa5c300342ac99c0810fd9b575c.zip
cpython-d25c1c635164daa5c300342ac99c0810fd9b575c.tar.gz
cpython-d25c1c635164daa5c300342ac99c0810fd9b575c.tar.bz2
Implement itertools.groupby()
Original idea by Guido van Rossum. Idea for skipable inner iterators by Raymond Hettinger. Idea for argument order and identity function default by Alex Martelli. Implementation by Hye-Shik Chang (with tweaks by Raymond Hettinger).
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS5
1 files changed, 5 insertions, 0 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index af61c4e..a28d042 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -164,6 +164,11 @@ Extension modules
SF bug #812202). Generators that do not define genrandbits() now
issue a warning when randrange() is called with a range that large.
+- itertools has a new function, groupby() for aggregating iterables
+ into groups sharing the same key (as determined by a key function).
+ It offers some of functionality of SQL's groupby keyword and of
+ the Unix uniq filter.
+
- itertools now has a new function, tee() which produces two independent
iterators from a single iterable.