Package Bio :: Package _py3k :: Module _ordereddict :: Class OrderedDict
[hide private]
[frames] | no frames]

Class OrderedDict

source code

        object --+    
                 |    
              dict --+
                     |
UserDict.DictMixin --+
                     |
                    OrderedDict

Instance Methods [hide private]
new empty dictionary

__init__(self, *args, **kwds)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
None

clear(self)
Remove all items from D.
source code
 
__setitem__(self, key, value)
x[i]=y
source code
 
__delitem__(self, key)
del x[y]
source code
 
__iter__(self)
iter(x)
source code
 
__reversed__(self) source code
(k, v), remove and return some (key, value) pair as a

popitem(self, last=True)
2-tuple; but raise KeyError if D is empty.
source code
 
__reduce__(self)
helper for pickle
source code
list of D's keys

keys(self) source code
D.get(k,d), also set D[k]=d if k not in D

setdefault(self, key, default=None)
None

update(self, other=None, **kwargs)
Update D from dict/iterable E and F.
v, remove specified key and return the corresponding value

pop(self, key, *args)
If key is not found, d is returned if given, otherwise KeyError is raised
list of D's values

values(self)
list of D's (key, value) pairs, as 2-tuples

items(self)
an iterator over the keys of D

iterkeys(self)
an iterator over the values of D

itervalues(self)
an iterator over the (key, value) items of D

iteritems(self)
 
__repr__(self)
repr(x)
source code
a shallow copy of D

copy(self) source code
 
__eq__(self, other)
x==y
source code
 
__ne__(self, other)
x!=y
source code

Inherited from dict: __cmp__, __contains__, __ge__, __getattribute__, __getitem__, __gt__, __le__, __len__, __lt__, __new__, __sizeof__, get, has_key, viewitems, viewkeys, viewvalues

Inherited from object: __delattr__, __format__, __reduce_ex__, __setattr__, __str__, __subclasshook__

Class Methods [hide private]
New dict with keys from S and values equal to v

fromkeys(cls, iterable, value=None)
v defaults to None.
source code
Class Variables [hide private]

Inherited from dict: __hash__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, *args, **kwds)
(Constructor)

source code 
x.__init__(...) initializes x; see help(type(x)) for signature

Returns:
new empty dictionary

Overrides: object.__init__
(inherited documentation)

clear(self)

source code 
Remove all items from D.

Returns:
None

Overrides: UserDict.DictMixin.clear

__setitem__(self, key, value)
(Index assignment operator)

source code 
x[i]=y

Overrides: dict.__setitem__
(inherited documentation)

__delitem__(self, key)
(Index deletion operator)

source code 
del x[y]

Overrides: dict.__delitem__
(inherited documentation)

__iter__(self)

source code 
iter(x)

Overrides: UserDict.DictMixin.__iter__

popitem(self, last=True)

source code 
2-tuple; but raise KeyError if D is empty.

Returns:
(k, v), remove and return some (key, value) pair as a

Overrides: UserDict.DictMixin.popitem

__reduce__(self)

source code 
helper for pickle

Overrides: object.__reduce__
(inherited documentation)

keys(self)

source code 


Returns:
list of D's keys

Overrides: dict.keys
(inherited documentation)

setdefault(self, key, default=None)

 


Returns:
D.get(k,d), also set D[k]=d if k not in D

Overrides: UserDict.DictMixin.setdefault

update(self, other=None, **kwargs)

 
Update D from dict/iterable E and F.
If E present and has a .keys() method, does:     for k in E: D[k] = E[k]
If E present and lacks .keys() method, does:     for (k, v) in E: D[k] = v
In either case, this is followed by: for k in F: D[k] = F[k]

Returns:
None

Overrides: UserDict.DictMixin.update

pop(self, key, *args)

 
If key is not found, d is returned if given, otherwise KeyError is raised

Returns:
v, remove specified key and return the corresponding value

Overrides: UserDict.DictMixin.pop

values(self)

 


Returns:
list of D's values

Overrides: UserDict.DictMixin.values

items(self)

 


Returns:
list of D's (key, value) pairs, as 2-tuples

Overrides: UserDict.DictMixin.items

iterkeys(self)

 


Returns:
an iterator over the keys of D

Overrides: UserDict.DictMixin.iterkeys

itervalues(self)

 


Returns:
an iterator over the values of D

Overrides: UserDict.DictMixin.itervalues

iteritems(self)

 


Returns:
an iterator over the (key, value) items of D

Overrides: UserDict.DictMixin.iteritems

__repr__(self)
(Representation operator)

source code 
repr(x)

Overrides: UserDict.DictMixin.__repr__

copy(self)

source code 


Returns:
a shallow copy of D

Overrides: dict.copy
(inherited documentation)

fromkeys(cls, iterable, value=None)
Class Method

source code 
v defaults to None.

Returns:
New dict with keys from S and values equal to v

Overrides: dict.fromkeys
(inherited documentation)

__eq__(self, other)
(Equality operator)

source code 
x==y

Overrides: dict.__eq__
(inherited documentation)

__ne__(self, other)

source code 
x!=y

Overrides: dict.__ne__
(inherited documentation)