Issue1949

classification
Title: deque does not take a maxlen keyword arg
Type: behaviour Severity: normal
Components: Versions: Jython 2.7
process
Status: open Resolution: remind
Dependencies: Superseder:
Assigned To: Nosy List: duffy151, fwierzbicki, irmen
Priority: high Keywords:

Created on 2012-07-23.22:10:02 by duffy151, last changed 2013-02-20.00:21:10 by fwierzbicki.

Messages
msg7334 (view) Author: Kevin Duffy (duffy151) Date: 2012-07-23.22:10:02
Referring to http://docs.python.org/library/collections.html#collections.deque , deque() should take a maxlen keyword arg to enable a ringbuffer / bounded length deque. 

Jython:
Jython 2.7a2 (default:9c148a201233, May 24 2012, 15:49:00) 
[Java HotSpot(TM) 64-Bit Server VM (Apple Inc.)] on java1.6.0_33
Type "help", "copyright", "credits" or "license" for more information.
>>> from collections import deque
>>> deque(maxlen=10)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: deque() does not take keyword arguments
>>> 

CPython:
Python 2.7.3 (default, Jul  9 2012, 10:36:52) 
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from collections import deque
>>> deque(maxlen=10)
deque([], maxlen=10)
>>>
msg7538 (view) Author: Irmen de Jong (irmen) Date: 2012-11-27.22:39:11
I'm encountering this problem as well.
History
Date User Action Args
2013-02-20 00:21:10fwierzbickisetnosy: + fwierzbicki
resolution: remind
2013-02-20 00:20:55fwierzbickisetpriority: high
versions: + Jython 2.7, - 2.7a2
2012-11-27 22:39:11irmensetnosy: + irmen
messages: + msg7538
2012-07-23 22:10:02duffy151create