mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
For collections.deque() objects, expose the maxlen parameter as a read-only attribute.
This commit is contained in:
parent
060c7f6bba
commit
5bb0f0e072
4 changed files with 36 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue