summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2003-10-24 08:45:23 (GMT)
committerRaymond Hettinger <python@rcn.com>2003-10-24 08:45:23 (GMT)
commit6a5b02774284c20d6860edc16157cb99a0c0b3ca (patch)
treec73b067ee8a94069abb4d44ad1e00f73a6c4aa5b /Misc
parent16b9fa8db30f6657fa3fb73724cc3d3f1432c16d (diff)
downloadcpython-6a5b02774284c20d6860edc16157cb99a0c0b3ca.zip
cpython-6a5b02774284c20d6860edc16157cb99a0c0b3ca.tar.gz
cpython-6a5b02774284c20d6860edc16157cb99a0c0b3ca.tar.bz2
Added itertools.tee()
It works like the pure python verion except: * it stops storing data after of the iterators gets deallocated * the data queue is implemented with two stacks instead of one dictionary.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS33
1 files changed, 18 insertions, 15 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index a53fdaf..08568dd 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -73,6 +73,24 @@ Extension modules
- Implemented (?(id/name)yes|no) support in SRE (#572936).
+- random.seed() with no arguments or None uses time.time() as a default
+ seed. Modified to match Py2.2 behavior and use fractional seconds so
+ that successive runs are more likely to produce different sequences.
+
+- random.Random has a new method, getrandbits(k), which returns an int
+ with k random bits. This method is now an optional part of the API
+ for user defined generators. Any generator that defines genrandbits()
+ can now use randrange() for ranges with a length >= 2**53. Formerly,
+ randrange would return only even numbers for ranges that large (see
+ SF bug #812202). Generators that do not define genrandbits() now
+ issue a warning when randrange() is called with a range that large.
+
+- itertools now has a new function, tee() which produces two independent
+ iterators from a single iterable.
+
+- itertools.izip() with no arguments now returns an empty iterator instead
+ of raising a TypeError exception.
+
Library
-------
@@ -108,21 +126,6 @@ Library
allow any iterable. Also the Set.update() has been deprecated because
it duplicates Set.union_update().
-- random.seed() with no arguments or None uses time.time() as a default
- seed. Modified to match Py2.2 behavior and use fractional seconds so
- that successive runs are more likely to produce different sequences.
-
-- random.Random has a new method, getrandbits(k), which returns an int
- with k random bits. This method is now an optional part of the API
- for user defined generators. Any generator that defines genrandbits()
- can now use randrange() for ranges with a length >= 2**53. Formerly,
- randrange would return only even numbers for ranges that large (see
- SF bug #812202). Generators that do not define genrandbits() now
- issue a warning when randrange() is called with a range that large.
-
-- itertools.izip() with no arguments now returns an empty iterator instead
- of raising a TypeError exception.
-
- _strptime.py now has a behind-the-scenes caching mechanism for the most
recent TimeRE instance used along with the last five unique directive
patterns. The overall module was also made more thread-safe.