classification
Title: Collections.deque maxlen: added in 2.6 or 2.7?
Type: behavior Stage: resolved
Components: Versions: Python 2.7
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: Elena.Oat, ezio.melotti, r.david.murray, rhettinger, terry.reedy
Priority: normal Keywords:

Created on 2016-01-01 20:48 by terry.reedy, last changed 2016-01-10 08:51 by ezio.melotti. This issue is now closed.

Messages (4)
msg257299 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2016-01-01 20:48
https://docs.python.org/2.6/library/collections.html#collections.deque has this line "Changed in version 2.6: Added maxlen parameter."

https://docs.python.org/2.7/library/collections.html#collections.deque kept the sentence above and added this entry after the list of methods.

Deque objects also provide one read-only attribute:
maxlen
    Maximum size of a deque or None if unbounded.
    New in version 2.7.

Which is it?
msg257300 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2016-01-01 20:51
'parameter' and 'attribute' are two different things.  I presume the documentation is accurate, but haven't checked :)
msg257900 - (view) Author: Elena Oat (Elena.Oat) * Date: 2016-01-10 08:48
I checked and 2.6 python has maxlen as a parameter, but not a maxlen attribute. The maxlen attribute was added in 2.7.
msg257901 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2016-01-10 08:51
Thanks for checking.  Closing.
History
Date User Action Args
2016-01-10 08:51:26ezio.melottisetstatus: open -> closed

nosy: + ezio.melotti
messages: + msg257901

resolution: not a bug
stage: needs patch -> resolved
2016-01-10 08:48:49Elena.Oatsetnosy: + Elena.Oat
messages: + msg257900
2016-01-01 20:51:34r.david.murraysetnosy: + r.david.murray
messages: + msg257300
2016-01-01 20:48:20terry.reedycreate