summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2008-07-22 19:00:47 (GMT)
committerRaymond Hettinger <python@rcn.com>2008-07-22 19:00:47 (GMT)
commit340383ce70c17cf6a1d4c9c87320c7dc979b205f (patch)
treeac100325d0106880d5989a67fe11d1dbcdb23316 /Doc/whatsnew
parent9973ee86eda8a4976d9ae5dd34e21df1b9d38b39 (diff)
downloadcpython-340383ce70c17cf6a1d4c9c87320c7dc979b205f.zip
cpython-340383ce70c17cf6a1d4c9c87320c7dc979b205f.tar.gz
cpython-340383ce70c17cf6a1d4c9c87320c7dc979b205f.tar.bz2
Tuples now have both count() and index().
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r--Doc/whatsnew/2.6.rst6
1 files changed, 4 insertions, 2 deletions
diff --git a/Doc/whatsnew/2.6.rst b/Doc/whatsnew/2.6.rst
index cf9682b..f895f80 100644
--- a/Doc/whatsnew/2.6.rst
+++ b/Doc/whatsnew/2.6.rst
@@ -1441,13 +1441,15 @@ Here are all of the changes that Python 2.6 makes to the core Python language.
it will be returned if *iterator* has been exhausted; otherwise,
the :exc:`StopIteration` exception will be raised. (:issue:`2719`)
-* Tuples now have an :meth:`index` method matching the list type's
- :meth:`index` method::
+* Tuples now have :meth:`index` and :meth:`count` methods matching the
+ list type's :meth:`index` and :meth:`count` methods::
>>> t = (0,1,2,3,4)
>>> t.index(3)
3
+ (Contributed by Raymond Hettinger)
+
* The built-in types now have improved support for extended slicing syntax,
where various combinations of ``(start, stop, step)`` are supplied.
Previously, the support was partial and certain corner cases wouldn't work.