Package Bio :: Package EUtils :: Module MultiDict :: Class _BaseMultiDict
[hide private]
[frames] | no frames]

Class _BaseMultiDict

source code

Known Subclasses:

Instance Methods [hide private]
 
__str__(self)
shows contents as if this is a dictionary
source code
 
__len__(self)
the number of unique keys
source code
 
__getitem__(self, key)
value for a given key
source code
 
get(self, key, default=None)
value for the given key; default = None if not present
source code
 
__contains__(self, key)
check if the key exists
source code
 
keys(self)
unordered list of unique keys
source code
 
values(self)
unordered list of values
source code
 
items(self)
unordered list of key/value pairs
source code
 
getall(self, key)
Get all values for a given key
source code
 
__iter__(self)
iterate through the list of unique keys
source code
Method Details [hide private]

__str__(self)
(Informal representation operator)

source code 

shows contents as if this is a dictionary

If multiple values exist for a given key, use the last one added.

__getitem__(self, key)
(Indexing operator)

source code 

value for a given key

If more than one value exists for the key, use one added most recently

get(self, key, default=None)

source code 

value for the given key; default = None if not present

If more than one value exists for the key, use the one added most recently.

values(self)

source code 

unordered list of values

If more than one value exists for a given key, use the value added most recently.

items(self)

source code 

unordered list of key/value pairs

If more than one value exists for a given key, use the value added most recently.

getall(self, key)

source code 

Get all values for a given key

Multiple values are returned in input order. If the key does not exists, returns an empty list.