diff options
author | Georg Brandl <georg@python.org> | 2013-10-06 11:01:23 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2013-10-06 11:01:23 (GMT) |
commit | 449709272f42c6098a487c726c99bb5d06806954 (patch) | |
tree | 3458389a7694faea81eac16ff50f56648e9625dc /Doc/tutorial | |
parent | f70acb7874e6d17b266c1e85a45e40e45b607c00 (diff) | |
parent | a12b68203381b349effba8d442af4a98a74fbb3e (diff) | |
download | cpython-449709272f42c6098a487c726c99bb5d06806954.zip cpython-449709272f42c6098a487c726c99bb5d06806954.tar.gz cpython-449709272f42c6098a487c726c99bb5d06806954.tar.bz2 |
merge with 3.3
Diffstat (limited to 'Doc/tutorial')
-rw-r--r-- | Doc/tutorial/datastructures.rst | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Doc/tutorial/datastructures.rst b/Doc/tutorial/datastructures.rst index 53077e4..24d2d2e 100644 --- a/Doc/tutorial/datastructures.rst +++ b/Doc/tutorial/datastructures.rst @@ -54,6 +54,12 @@ objects: 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 @@ objects: 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] |