Home | Trees | Index | Help |
|
---|
Package svndump :: Module common :: Class ListDict |
|
object
--+ |dict
--+ | ListDict
A mix of list and dict.
If the key is an int this class acts like a list else like a dict.Method Summary | |
---|---|
Initialize. | |
Removes the key/value pair for the specified key or index. | |
object |
Returns the value for the specified key or index if it's an int. |
iterator |
Returns an iterator returning key/value tuples ordered by index. |
Adds a key/value pair or replaces the value if the key already exists. | |
Clears this ListDict. | |
tuple |
Returns the key/value tuple for the given index. |
list |
Returns a list of key/value tuples ordered by index. |
iterator |
Returns an iterator returning key/value tuples ordered by index. |
iterator |
Returns an iterator returning keys ordered by index. |
iterator |
Returns an iterator returning values ordered by index. |
object |
Returns the key for the given index. |
list |
Returns a list of keys ordered by index. |
list |
Returns a list of values ordered by index. |
Inherited from dict | |
x.__cmp__(y) <==> cmp(x,y) | |
D.__contains__(k) -> True if D has a key k, else False | |
x.__eq__(y) <==> x==y | |
x.__ge__(y) <==> x>=y | |
x.__getattribute__('name') <==> x.name | |
x.__gt__(y) <==> x>y | |
x.__hash__() <==> hash(x) | |
x.__le__(y) <==> x<=y | |
x.__len__() <==> len(x) | |
x.__lt__(y) <==> x<y | |
x.__ne__(y) <==> x!=y | |
T.__new__(S, ...) -> a new object with type S, a subtype of T | |
x.__repr__() <==> repr(x) | |
D.copy() -> a shallow copy of D | |
D.get(k[,d]) -> D[k] if k in D, else d. | |
D.has_key(k) -> True if D has a key k, else False | |
If key is not found, d is returned if given, otherwise KeyError is raised | |
2-tuple; but raise KeyError if D is empty | |
D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D | |
D.update(E, **F) -> None. | |
Inherited from object | |
x.__delattr__('name') <==> del x.name | |
helper for pickle | |
helper for pickle | |
x.__setattr__('name', value) <==> x.name = value | |
x.__str__() <==> str(x) | |
Inherited from type | |
v defaults to None. |
Method Details |
---|
__init__(self)
Initialize.
|
__delitem__(self,
key)
Removes the key/value pair for the specified key or index.
|
__getitem__(self,
key)
Returns the value for the specified key or index if it's an int.
|
__iter__(self)Returns an iterator returning key/value tuples ordered by index.
|
__setitem__(self,
key,
value)
|
clear(self)Clears this ListDict.
|
item(self, index)Returns the key/value tuple for the given index.
|
items(self)Returns a list of key/value tuples ordered by index.
|
iteritems(self)Returns an iterator returning key/value tuples ordered by index.
|
iterkeys(self)Returns an iterator returning keys ordered by index.
|
itervalues(self)Returns an iterator returning values ordered by index.
|
key(self, index)Returns the key for the given index.
|
keys(self)Returns a list of keys ordered by index.
|
values(self)Returns a list of values ordered by index.
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Wed Apr 11 04:31:45 2007 | http://epydoc.sf.net |