| |
- __builtin__.dict(__builtin__.object)
-
- EdgeDict(__builtin__.dict, delegate.Delegate)
- VertexDict(__builtin__.dict, delegate.Delegate)
- __builtin__.float(__builtin__.object)
-
- SortStruct(__builtin__.float, __builtin__.object)
- __builtin__.object
-
- SortStruct(__builtin__.float, __builtin__.object)
- delegate.Delegate(__builtin__.object)
-
- EdgeDict(__builtin__.dict, delegate.Delegate)
- Graph
-
- Tree
- RawEdge
-
- DirEdge
-
- DataDirEdge
- UndirEdge
-
- DataUndirEdge
- Vertex
-
- DataVertex
- VertexDict(__builtin__.dict, delegate.Delegate)
- exceptions.StandardError(exceptions.Exception)
-
- GraphError
-
- TreeError
class DataDirEdge(DirEdge) |
|
Wrapper to add 'data' to another class. |
|
- Method resolution order:
- DataDirEdge
- DirEdge
- RawEdge
- delegate.Delegate
- __builtin__.object
Methods defined here:
- __init__(self, *pargs, **kargs)
- Use last parg for data and sends all other args to base.
- __str__(self)
- Append data to base's __str__.
Methods inherited from DirEdge:
- enters(self, v)
- True only if the vertex is this edge's destination.
- invert(self)
- Inverts the edge direction.
- leaves(self, v)
- True only if the vertex is this edge's source.
- weight(self, v1, v2)
- 1 if this edge has v1 as its source and v2 as its destination.
Data descriptors inherited from DirEdge:
- dest_v
- Single element list containing the edge's destination vertex.
Must be a list to conform with UndirEdge's interface.
- src_v
- Single element list containing the edge's source vertex.
Must be a list to conform with UndirEdge's interface.
Methods inherited from RawEdge:
- __setstate__(self, state)
- Restore own state and add self to connected vertex edge lists.
Data descriptors inherited from RawEdge:
- all_v
- All connected vertices.
Data descriptors inherited from delegate.Delegate:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Data and other attributes inherited from delegate.Delegate:
- __metaclass__ = <class 'delegate._delegate_meta'>
- Sets up delegation private variables.
Traverses inheritance graph on class construction. Creates a private
__base variable for each base class. If delegating to the base class is
inappropriate, uses _no_delegation class.
|
class DataUndirEdge(UndirEdge) |
|
Wrapper to add 'data' to another class. |
|
- Method resolution order:
- DataUndirEdge
- UndirEdge
- RawEdge
- delegate.Delegate
- __builtin__.object
Methods defined here:
- __init__(self, *pargs, **kargs)
- Use last parg for data and sends all other args to base.
- __str__(self)
- Append data to base's __str__.
Methods inherited from UndirEdge:
- enters(self, v)
- True if this edge is connected to the vertex.
- leaves(self, v)
- True if this edge is connected to the vertex.
- weight(self, v1, v2)
- 1 if this edge connects the vertices.
Data descriptors inherited from UndirEdge:
- dest_v
- Destination vertices.
- src_v
- Source vertices.
Methods inherited from RawEdge:
- __setstate__(self, state)
- Restore own state and add self to connected vertex edge lists.
Data descriptors inherited from RawEdge:
- all_v
- All connected vertices.
Data descriptors inherited from delegate.Delegate:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Data and other attributes inherited from delegate.Delegate:
- __metaclass__ = <class 'delegate._delegate_meta'>
- Sets up delegation private variables.
Traverses inheritance graph on class construction. Creates a private
__base variable for each base class. If delegating to the base class is
inappropriate, uses _no_delegation class.
|
class DataVertex(Vertex) |
|
Wrapper to add 'data' to another class. |
|
- Method resolution order:
- DataVertex
- Vertex
- delegate.Delegate
- __builtin__.object
Methods defined here:
- __init__(self, *pargs, **kargs)
- Use last parg for data and sends all other args to base.
- __str__(self)
- Append data to base's __str__.
Methods inherited from Vertex:
- __getstate__(self)
- Need to break cycles to prevent recursion blowup in pickle.
Dump everything except for edges.
- attach_e(self, e)
- Attach an edge.
- connecting_e(self, v)
- List of edges connecting self and other vertex.
Data descriptors inherited from Vertex:
- adjacent_v
- Set of adjacent vertices. Edge direction ignored.
- all_e
- All edges.
- in_e
- Incoming edges.
- in_v
- Set of vertices connected by incoming edges.
- is_intermed
- True if vertex has incoming and outgoing edges.
- is_sink
- True if vertex has no outgoing edges.
- is_src
- True if vertex has no incoming edges.
- out_e
- Outgoing edges.
- out_v
- Set of vertices connected by outgoing edges.
Data descriptors inherited from delegate.Delegate:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Data and other attributes inherited from delegate.Delegate:
- __metaclass__ = <class 'delegate._delegate_meta'>
- Sets up delegation private variables.
Traverses inheritance graph on class construction. Creates a private
__base variable for each base class. If delegating to the base class is
inappropriate, uses _no_delegation class.
|
class DirEdge(RawEdge) |
|
Directed edge. |
|
- Method resolution order:
- DirEdge
- RawEdge
- delegate.Delegate
- __builtin__.object
Methods defined here:
- __str__(self)
- enters(self, v)
- True only if the vertex is this edge's destination.
- invert(self)
- Inverts the edge direction.
- leaves(self, v)
- True only if the vertex is this edge's source.
- weight(self, v1, v2)
- 1 if this edge has v1 as its source and v2 as its destination.
Data descriptors defined here:
- dest_v
- Single element list containing the edge's destination vertex.
Must be a list to conform with UndirEdge's interface.
- src_v
- Single element list containing the edge's source vertex.
Must be a list to conform with UndirEdge's interface.
Methods inherited from RawEdge:
- __init__(self, name, v1, v2)
- Name needn't be a string but must be immutable and hashable.
- __setstate__(self, state)
- Restore own state and add self to connected vertex edge lists.
Data descriptors inherited from RawEdge:
- all_v
- All connected vertices.
Data descriptors inherited from delegate.Delegate:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Data and other attributes inherited from delegate.Delegate:
- __metaclass__ = <class 'delegate._delegate_meta'>
- Sets up delegation private variables.
Traverses inheritance graph on class construction. Creates a private
__base variable for each base class. If delegating to the base class is
inappropriate, uses _no_delegation class.
|
class EdgeDict(__builtin__.dict, delegate.Delegate) |
|
Dictionary of edges. |
|
- Method resolution order:
- EdgeDict
- __builtin__.dict
- delegate.Delegate
- __builtin__.object
Methods defined here:
- __delitem__(self, key)
- Remove edge from vertices to which it is attached.
- __setitem__(self, key, val)
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Methods inherited from __builtin__.dict:
- __cmp__(...)
- x.__cmp__(y) <==> cmp(x,y)
- __contains__(...)
- D.__contains__(k) -> True if D has a key k, else False
- __eq__(...)
- x.__eq__(y) <==> x==y
- __ge__(...)
- x.__ge__(y) <==> x>=y
- __getattribute__(...)
- x.__getattribute__('name') <==> x.name
- __getitem__(...)
- x.__getitem__(y) <==> x[y]
- __gt__(...)
- x.__gt__(y) <==> x>y
- __hash__(...)
- x.__hash__() <==> hash(x)
- __init__(...)
- x.__init__(...) initializes x; see x.__class__.__doc__ for signature
- __iter__(...)
- x.__iter__() <==> iter(x)
- __le__(...)
- x.__le__(y) <==> x<=y
- __len__(...)
- x.__len__() <==> len(x)
- __lt__(...)
- x.__lt__(y) <==> x<y
- __ne__(...)
- x.__ne__(y) <==> x!=y
- __repr__(...)
- x.__repr__() <==> repr(x)
- clear(...)
- D.clear() -> None. Remove all items from D.
- copy(...)
- D.copy() -> a shallow copy of D
- get(...)
- D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None.
- has_key(...)
- D.has_key(k) -> True if D has a key k, else False
- items(...)
- D.items() -> list of D's (key, value) pairs, as 2-tuples
- iteritems(...)
- D.iteritems() -> an iterator over the (key, value) items of D
- iterkeys(...)
- D.iterkeys() -> an iterator over the keys of D
- itervalues(...)
- D.itervalues() -> an iterator over the values of D
- keys(...)
- D.keys() -> list of D's keys
- pop(...)
- D.pop(k[,d]) -> v, remove specified key and return the corresponding value
If key is not found, d is returned if given, otherwise KeyError is raised
- popitem(...)
- D.popitem() -> (k, v), remove and return some (key, value) pair as a
2-tuple; but raise KeyError if D is empty
- setdefault(...)
- D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D
- update(...)
- D.update(E, **F) -> None. Update D from E and F: for k in E: D[k] = E[k]
(if E has keys else: for (k, v) in E: D[k] = v) then: for k in F: D[k] = F[k]
- values(...)
- D.values() -> list of D's values
Data and other attributes inherited from __builtin__.dict:
- __new__ = <built-in method __new__ of type object at 0x7fa302fff3a0>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
- fromkeys = <built-in method fromkeys of _delegate_meta object at 0x6f7a60>
- dict.fromkeys(S[,v]) -> New dict with keys from S and values equal to v.
v defaults to None.
Data and other attributes inherited from delegate.Delegate:
- __metaclass__ = <class 'delegate._delegate_meta'>
- Sets up delegation private variables.
Traverses inheritance graph on class construction. Creates a private
__base variable for each base class. If delegating to the base class is
inappropriate, uses _no_delegation class.
|
class Graph(delegate.Delegate) |
|
General-purpose graph data structure. |
|
- Method resolution order:
- Graph
- delegate.Delegate
- __builtin__.object
Methods defined here:
- __init__(self, name=None)
- __str__(self)
- add_e(self, e)
- Add and return an edge.
- add_v(self, v)
- Add and return a vertex.
- all_pairs_sp(self, weight_func=None)
- Return a dictionary of shortest path lists for all vertex pairs.
Keys are (source, destination) tuples.
'weight_func' is a function taking (edge, v1, v2) that returns a weight.
Defaults to e.weight()
- connected_components(self)
- Return a list of lists. Each holds transitively-connected vertices.
- greedy_paths(self, start, goal, weight_func=None)
- Return a dict of greedy paths with (start vertex, end vertex) keys.
Always makes the highest-gain decision. Will find a path if one exists.
Not necessarily optimal. 'weight_func' is a function of (edge, v1, v2)
returning a weight. Defaults to e.weight()
- minimal_span_tree(self, **kargs)
- Return minimal spanning 'Tree'.
Keyword arg 'weight_func' is a function taking (edge, v1, v2) and
returning a weight. Defaults to e.weight().
'targets' list of target vertices. Defaults to all vertices.
- shortest_tree(self, start, **kargs)
- Return a 'Tree' of shortest paths to all nodes.
Keyword arg 'weight_func' is a function taking (edge, v1, v2) and
returning a weight. Defaults to e.weight().
'targets' list of target vertices. Defaults to all vertices.
Static methods defined here:
- breadth_first_search(start_v)
- Return a breadth-first search list of vertices.
- depth_first_search(start_v)
- Return a depth-first search list of vertices.
- path_weight(path, weight_func=None)
- Return the weight of the path, which is a list of vertices.
'weight_func' is a function taking (edge, v1, v2) and returning a weight.
- topological_sort(start_v)
- Return a topological sort list of vertices.
Data descriptors defined here:
- intermed_v
- List of all vertices with both incoming and outgoing edges.
- sink_v
- List of all vertices without outgoing edges.
- src_v
- List of all vertices without incoming edges.
Data descriptors inherited from delegate.Delegate:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Data and other attributes inherited from delegate.Delegate:
- __metaclass__ = <class 'delegate._delegate_meta'>
- Sets up delegation private variables.
Traverses inheritance graph on class construction. Creates a private
__base variable for each base class. If delegating to the base class is
inappropriate, uses _no_delegation class.
|
class RawEdge(delegate.Delegate) |
|
Base class for undirected and directed edges. Not directly useful. |
|
- Method resolution order:
- RawEdge
- delegate.Delegate
- __builtin__.object
Methods defined here:
- __init__(self, name, v1, v2)
- Name needn't be a string but must be immutable and hashable.
- __setstate__(self, state)
- Restore own state and add self to connected vertex edge lists.
Data descriptors defined here:
- all_v
- All connected vertices.
Data descriptors inherited from delegate.Delegate:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Data and other attributes inherited from delegate.Delegate:
- __metaclass__ = <class 'delegate._delegate_meta'>
- Sets up delegation private variables.
Traverses inheritance graph on class construction. Creates a private
__base variable for each base class. If delegating to the base class is
inappropriate, uses _no_delegation class.
|
class SortStruct(__builtin__.float, __builtin__.object) |
|
Throw-away class for temporarily holding values.
Initialize with a float distance and as many keyword args as desired.
The keyword args become attributes. |
|
- Method resolution order:
- SortStruct
- __builtin__.float
- __builtin__.object
Static methods defined here:
- __new__(cls, val, **kargs)
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
- number
Methods inherited from __builtin__.float:
- __abs__(...)
- x.__abs__() <==> abs(x)
- __add__(...)
- x.__add__(y) <==> x+y
- __coerce__(...)
- x.__coerce__(y) <==> coerce(x, y)
- __div__(...)
- x.__div__(y) <==> x/y
- __divmod__(...)
- x.__divmod__(y) <==> divmod(x, y)
- __eq__(...)
- x.__eq__(y) <==> x==y
- __float__(...)
- x.__float__() <==> float(x)
- __floordiv__(...)
- x.__floordiv__(y) <==> x//y
- __ge__(...)
- x.__ge__(y) <==> x>=y
- __getattribute__(...)
- x.__getattribute__('name') <==> x.name
- __getnewargs__(...)
- __gt__(...)
- x.__gt__(y) <==> x>y
- __hash__(...)
- x.__hash__() <==> hash(x)
- __int__(...)
- x.__int__() <==> int(x)
- __le__(...)
- x.__le__(y) <==> x<=y
- __long__(...)
- x.__long__() <==> long(x)
- __lt__(...)
- x.__lt__(y) <==> x<y
- __mod__(...)
- x.__mod__(y) <==> x%y
- __mul__(...)
- x.__mul__(y) <==> x*y
- __ne__(...)
- x.__ne__(y) <==> x!=y
- __neg__(...)
- x.__neg__() <==> -x
- __nonzero__(...)
- x.__nonzero__() <==> x != 0
- __pos__(...)
- x.__pos__() <==> +x
- __pow__(...)
- x.__pow__(y[, z]) <==> pow(x, y[, z])
- __radd__(...)
- x.__radd__(y) <==> y+x
- __rdiv__(...)
- x.__rdiv__(y) <==> y/x
- __rdivmod__(...)
- x.__rdivmod__(y) <==> divmod(y, x)
- __repr__(...)
- x.__repr__() <==> repr(x)
- __rfloordiv__(...)
- x.__rfloordiv__(y) <==> y//x
- __rmod__(...)
- x.__rmod__(y) <==> y%x
- __rmul__(...)
- x.__rmul__(y) <==> y*x
- __rpow__(...)
- y.__rpow__(x[, z]) <==> pow(x, y[, z])
- __rsub__(...)
- x.__rsub__(y) <==> y-x
- __rtruediv__(...)
- x.__rtruediv__(y) <==> y/x
- __str__(...)
- x.__str__() <==> str(x)
- __sub__(...)
- x.__sub__(y) <==> x-y
- __truediv__(...)
- x.__truediv__(y) <==> x/y
Data and other attributes inherited from __builtin__.float:
- __getformat__ = <built-in method __getformat__ of type object at 0x6d2730>
- float.__getformat__(typestr) -> string
You probably don't want to use this function. It exists mainly to be
used in Python's test suite.
typestr must be 'double' or 'float'. This function returns whichever of
'unknown', 'IEEE, big-endian' or 'IEEE, little-endian' best describes the
format of floating point numbers used by the C type named by typestr.
- __setformat__ = <built-in method __setformat__ of type object at 0x6d2730>
- float.__setformat__(typestr, fmt) -> None
You probably don't want to use this function. It exists mainly to be
used in Python's test suite.
typestr must be 'double' or 'float'. fmt must be one of 'unknown',
'IEEE, big-endian' or 'IEEE, little-endian', and in addition can only be
one of the latter two if it appears to match the underlying C reality.
Overrides the automatic determination of C-level floating point type.
This affects how floats are converted to and from binary strings.
|
class Tree(Graph) |
|
Tree data structure.
Edges must be directed and reconvergent paths do not occur. |
|
- Method resolution order:
- Tree
- Graph
- delegate.Delegate
- __builtin__.object
Methods defined here:
- add_e(self, e)
- Add edge if tree invariant holds. Otherwise, raise exception.
- auto_add_e(self, e)
- Automatically choose correct direction for new edge.
- is_safe_e(self, target_v)
- True if edge maintains tree invariant.
- path_dict(self)
- Return a dictionary of path lists from the root to each vertex.
Keys are (source vertex, destination vertex) tuples.
Methods inherited from Graph:
- __init__(self, name=None)
- __str__(self)
- add_v(self, v)
- Add and return a vertex.
- all_pairs_sp(self, weight_func=None)
- Return a dictionary of shortest path lists for all vertex pairs.
Keys are (source, destination) tuples.
'weight_func' is a function taking (edge, v1, v2) that returns a weight.
Defaults to e.weight()
- connected_components(self)
- Return a list of lists. Each holds transitively-connected vertices.
- greedy_paths(self, start, goal, weight_func=None)
- Return a dict of greedy paths with (start vertex, end vertex) keys.
Always makes the highest-gain decision. Will find a path if one exists.
Not necessarily optimal. 'weight_func' is a function of (edge, v1, v2)
returning a weight. Defaults to e.weight()
- minimal_span_tree(self, **kargs)
- Return minimal spanning 'Tree'.
Keyword arg 'weight_func' is a function taking (edge, v1, v2) and
returning a weight. Defaults to e.weight().
'targets' list of target vertices. Defaults to all vertices.
- shortest_tree(self, start, **kargs)
- Return a 'Tree' of shortest paths to all nodes.
Keyword arg 'weight_func' is a function taking (edge, v1, v2) and
returning a weight. Defaults to e.weight().
'targets' list of target vertices. Defaults to all vertices.
Static methods inherited from Graph:
- breadth_first_search(start_v)
- Return a breadth-first search list of vertices.
- depth_first_search(start_v)
- Return a depth-first search list of vertices.
- path_weight(path, weight_func=None)
- Return the weight of the path, which is a list of vertices.
'weight_func' is a function taking (edge, v1, v2) and returning a weight.
- topological_sort(start_v)
- Return a topological sort list of vertices.
Data descriptors inherited from Graph:
- intermed_v
- List of all vertices with both incoming and outgoing edges.
- sink_v
- List of all vertices without outgoing edges.
- src_v
- List of all vertices without incoming edges.
Data descriptors inherited from delegate.Delegate:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Data and other attributes inherited from delegate.Delegate:
- __metaclass__ = <class 'delegate._delegate_meta'>
- Sets up delegation private variables.
Traverses inheritance graph on class construction. Creates a private
__base variable for each base class. If delegating to the base class is
inappropriate, uses _no_delegation class.
|
class UndirEdge(RawEdge) |
|
Undirected edge. |
|
- Method resolution order:
- UndirEdge
- RawEdge
- delegate.Delegate
- __builtin__.object
Methods defined here:
- __str__(self)
- enters(self, v)
- True if this edge is connected to the vertex.
- leaves(self, v)
- True if this edge is connected to the vertex.
- weight(self, v1, v2)
- 1 if this edge connects the vertices.
Data descriptors defined here:
- dest_v
- Destination vertices.
- src_v
- Source vertices.
Methods inherited from RawEdge:
- __init__(self, name, v1, v2)
- Name needn't be a string but must be immutable and hashable.
- __setstate__(self, state)
- Restore own state and add self to connected vertex edge lists.
Data descriptors inherited from RawEdge:
- all_v
- All connected vertices.
Data descriptors inherited from delegate.Delegate:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Data and other attributes inherited from delegate.Delegate:
- __metaclass__ = <class 'delegate._delegate_meta'>
- Sets up delegation private variables.
Traverses inheritance graph on class construction. Creates a private
__base variable for each base class. If delegating to the base class is
inappropriate, uses _no_delegation class.
|
class Vertex(delegate.Delegate) |
|
General graph vertex.
All methods colaborate with directed and undirected
edges. If the edges are undirected, ine == oute. |
|
- Method resolution order:
- Vertex
- delegate.Delegate
- __builtin__.object
Methods defined here:
- __getstate__(self)
- Need to break cycles to prevent recursion blowup in pickle.
Dump everything except for edges.
- __init__(self, name)
- Name neen't be a string but must be hashable and immutable.
- __str__(self)
- attach_e(self, e)
- Attach an edge.
- connecting_e(self, v)
- List of edges connecting self and other vertex.
Data descriptors defined here:
- adjacent_v
- Set of adjacent vertices. Edge direction ignored.
- all_e
- All edges.
- in_e
- Incoming edges.
- in_v
- Set of vertices connected by incoming edges.
- is_intermed
- True if vertex has incoming and outgoing edges.
- is_sink
- True if vertex has no outgoing edges.
- is_src
- True if vertex has no incoming edges.
- out_e
- Outgoing edges.
- out_v
- Set of vertices connected by outgoing edges.
Data descriptors inherited from delegate.Delegate:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Data and other attributes inherited from delegate.Delegate:
- __metaclass__ = <class 'delegate._delegate_meta'>
- Sets up delegation private variables.
Traverses inheritance graph on class construction. Creates a private
__base variable for each base class. If delegating to the base class is
inappropriate, uses _no_delegation class.
|
class VertexDict(__builtin__.dict, delegate.Delegate) |
|
Dictionary of vertices. |
|
- Method resolution order:
- VertexDict
- __builtin__.dict
- delegate.Delegate
- __builtin__.object
Methods defined here:
- __delitem__(self, key)
- Delete all edges connected to the vertex, along with the vertex.
- __init__(self, graph)
- __setitem__(self, key, val)
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Methods inherited from __builtin__.dict:
- __cmp__(...)
- x.__cmp__(y) <==> cmp(x,y)
- __contains__(...)
- D.__contains__(k) -> True if D has a key k, else False
- __eq__(...)
- x.__eq__(y) <==> x==y
- __ge__(...)
- x.__ge__(y) <==> x>=y
- __getattribute__(...)
- x.__getattribute__('name') <==> x.name
- __getitem__(...)
- x.__getitem__(y) <==> x[y]
- __gt__(...)
- x.__gt__(y) <==> x>y
- __hash__(...)
- x.__hash__() <==> hash(x)
- __iter__(...)
- x.__iter__() <==> iter(x)
- __le__(...)
- x.__le__(y) <==> x<=y
- __len__(...)
- x.__len__() <==> len(x)
- __lt__(...)
- x.__lt__(y) <==> x<y
- __ne__(...)
- x.__ne__(y) <==> x!=y
- __repr__(...)
- x.__repr__() <==> repr(x)
- clear(...)
- D.clear() -> None. Remove all items from D.
- copy(...)
- D.copy() -> a shallow copy of D
- get(...)
- D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None.
- has_key(...)
- D.has_key(k) -> True if D has a key k, else False
- items(...)
- D.items() -> list of D's (key, value) pairs, as 2-tuples
- iteritems(...)
- D.iteritems() -> an iterator over the (key, value) items of D
- iterkeys(...)
- D.iterkeys() -> an iterator over the keys of D
- itervalues(...)
- D.itervalues() -> an iterator over the values of D
- keys(...)
- D.keys() -> list of D's keys
- pop(...)
- D.pop(k[,d]) -> v, remove specified key and return the corresponding value
If key is not found, d is returned if given, otherwise KeyError is raised
- popitem(...)
- D.popitem() -> (k, v), remove and return some (key, value) pair as a
2-tuple; but raise KeyError if D is empty
- setdefault(...)
- D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D
- update(...)
- D.update(E, **F) -> None. Update D from E and F: for k in E: D[k] = E[k]
(if E has keys else: for (k, v) in E: D[k] = v) then: for k in F: D[k] = F[k]
- values(...)
- D.values() -> list of D's values
Data and other attributes inherited from __builtin__.dict:
- __new__ = <built-in method __new__ of type object at 0x7fa302fff3a0>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
- fromkeys = <built-in method fromkeys of _delegate_meta object at 0x6f73b0>
- dict.fromkeys(S[,v]) -> New dict with keys from S and values equal to v.
v defaults to None.
Data and other attributes inherited from delegate.Delegate:
- __metaclass__ = <class 'delegate._delegate_meta'>
- Sets up delegation private variables.
Traverses inheritance graph on class construction. Creates a private
__base variable for each base class. If delegating to the base class is
inappropriate, uses _no_delegation class.
| |