Module collections :: Class deque
[hide private]
[frames] | no frames]

type deque

object --+
         |
        deque

deque(iterable) --> deque object

Build an ordered collection accessible from endpoints only.

Instance Methods [hide private]
 
__copy__(...)
Return a shallow copy of a deque.
 
__delitem__(x, y)
del x[y]
 
__eq__(x, y)
x==y
 
__ge__(x, y)
x>=y
 
__getattribute__(...)
x.__getattribute__('name') <==> x.name
 
__getitem__(x, y)
x[y]
 
__gt__(x, y)
x>y
 
__hash__(x)
hash(x)
 
__init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
 
__iter__(x)
iter(x)
 
__le__(x, y)
x<=y
 
__len__(x)
len(x)
 
__lt__(x, y)
x<y
 
__ne__(x, y)
x!=y
a new object with type S, a subtype of T
__new__(T, S, ...)
 
__reduce__(...)
Return state information for pickling.
 
__repr__(x)
repr(x)
 
__reversed__(D)
return a reverse iterator over the deque
 
__setitem__(x, i, y)
x[i]=y
 
append(...)
Add an element to the right side of the deque.
 
appendleft(...)
Add an element to the left side of the deque.
 
clear(...)
Remove all elements from the deque.
 
extend(...)
Extend the right side of the deque with elements from the iterable
 
extendleft(...)
Extend the left side of the deque with elements from the iterable
 
pop(...)
Remove and return the rightmost element.
 
popleft(...)
Remove and return the leftmost element.
 
remove(D, value)
remove first occurrence of value.
 
rotate(...)
Rotate the deque n steps to the right (default n=1).
Method Details [hide private]

__getattribute__(...)

 

x.__getattribute__('name') <==> x.name

Overrides: object.__getattribute__

__hash__(x)
(Hashing function)

 

hash(x)

Overrides: object.__hash__

__init__(...)
(Constructor)

 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__

__new__(T, S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__

__reduce__(...)

 

Return state information for pickling.

Overrides: object.__reduce__

__repr__(x)
(Representation operator)

 

repr(x)

Overrides: object.__repr__

rotate(...)

 

Rotate the deque n steps to the right (default n=1). If n is negative, rotates left.