summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2009-03-10 12:56:32 (GMT)
committerRaymond Hettinger <python@rcn.com>2009-03-10 12:56:32 (GMT)
commit5bb0f0e072ef22fa16bf281bc5e6b5d7a1594beb (patch)
tree1621e012d8d1ad69a2afe5f9bc17cdbb815466f4 /Doc/library
parent060c7f6bbafdaeb4b73ce34f1bb34e4ac76f2d92 (diff)
downloadcpython-5bb0f0e072ef22fa16bf281bc5e6b5d7a1594beb.zip
cpython-5bb0f0e072ef22fa16bf281bc5e6b5d7a1594beb.tar.gz
cpython-5bb0f0e072ef22fa16bf281bc5e6b5d7a1594beb.tar.bz2
For collections.deque() objects, expose the maxlen parameter as a read-only attribute.
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/collections.rst9
1 files changed, 9 insertions, 0 deletions
diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst
index ce47bd0..ef1bca2 100644
--- a/Doc/library/collections.rst
+++ b/Doc/library/collections.rst
@@ -361,6 +361,15 @@ counts, but the output will exclude results with counts of zero or less.
``d.appendleft(d.pop())``.
+ Deque objects also provide one read-only attribute:
+
+ .. attribute:: maxlen
+
+ Maximum size of a deque or *None* if unbounded.
+
+ .. versionadded:: 2.7
+
+
In addition to the above, deques support iteration, pickling, ``len(d)``,
``reversed(d)``, ``copy.copy(d)``, ``copy.deepcopy(d)``, membership testing with
the :keyword:`in` operator, and subscript references such as ``d[-1]``. Indexed