[Python-checkins] cpython (3.3): Add missing list methods. Found by Leonardo Pereira on docs at .
georg.brandl
python-checkins at python.org
Sun Oct 6 13:00:39 CEST 2013
http://hg.python.org/cpython/rev/d9b58229aabe
changeset: 86073:d9b58229aabe
branch: 3.3
parent: 86070:bcc837f8b640
user: Georg Brandl <georg at python.org>
date: Sun Oct 06 13:01:19 2013 +0200
summary:
Add missing list methods. Found by Leonardo Pereira on docs at .
files:
Doc/tutorial/datastructures.rst | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/Doc/tutorial/datastructures.rst b/Doc/tutorial/datastructures.rst
--- a/Doc/tutorial/datastructures.rst
+++ b/Doc/tutorial/datastructures.rst
@@ -54,6 +54,12 @@
will see this notation frequently in the Python Library Reference.)
+.. method:: list.clear()
+ :noindex:
+
+ Remove all items from the list. Equivalent to ``del a[:]``.
+
+
.. method:: list.index(x)
:noindex:
@@ -79,6 +85,12 @@
Reverse the elements of the list in place.
+.. method:: list.copy()
+ :noindex:
+
+ Return a shallow copy of the list. Equivalent to ``a[:]``.
+
+
An example that uses most of the list methods::
>>> a = [66.25, 333, 333, 1, 1234.5]
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list