Home | Trees | Index | Help |
|
---|
Module __builtin__ :: Class dict |
|
object
--+
|
dict
dict() -> new empty dictionary. dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs. dict(seq) -> new dictionary initialized as if via: d = {} for k, v in seq: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2)
Method Summary | |
---|---|
x.__init__(...) initializes x; see x.__class__.__doc__ for signature | |
__cmp__(x,
y)
Return cmp(x,y)... | |
__contains__(D,
k)
Return true if D has a key k, else False... | |
__delitem__(x,
y)
Return del x[y]... | |
__eq__(x,
y)
Return x==y... | |
__ge__(x,
y)
Return x>=y... | |
x.__getattribute__('name') <==> x.name | |
__getitem__(x,
y)
Return x[y]... | |
__gt__(x,
y)
Return x>y... | |
__hash__(x)
Return hash(x)... | |
__iter__(x)
Return iter(x)... | |
__le__(x,
y)
Return x<=y... | |
__len__(x)
Return len(x)... | |
__lt__(x,
y)
Return x<y... | |
__ne__(x,
y)
Return x!=y... | |
__new__(T,
S,
...)
Return a new object with type S, a subtype of T... | |
__repr__(x)
Return repr(x)... | |
__setitem__(x,
i,
y)
Return x[i]=y... | |
Remove all items from D. | |
copy(D)
Return a shallow copy of D... | |
d defaults to None. | |
has_key(D,
k)
Return true if D has a key k, else False... | |
items(D)
Return list of D's (key, value) pairs, as 2-tuples... | |
iteritems(D)
Return an iterator over the (key, value) items of D... | |
iterkeys(D)
Return an iterator over the keys of D... | |
itervalues(D)
Return an iterator over the values of D... | |
keys(D)
Return list of D's keys... | |
If key is not found, d is returned if given, otherwise KeyError is raised | |
2-tuple; but raise KeyError if D is empty | |
setdefault(D,
k,
d)
Return d.get(k,d), also set D[k]=d if k not in D... | |
D.update(E, **F) -> None. | |
values(D)
Return list of D's values... |
Method Details |
---|
__init__(...)
|
__getattribute__(...)x.__getattribute__('name') <==> x.name
|
clear(D)Remove all items from D.
|
get(D, k, d=...)d defaults to None.
|
pop(D, k, d=...)If key is not found, d is returned if given, otherwise KeyError is raised
|
popitem(D)2-tuple; but raise KeyError if D is empty
|
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] |
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1.20050511.rpd on Mon Feb 16 12:52:31 2009 | http://epydoc.sf.net |