dict :: Class dict
[hide private]
[frames] | no frames]

type dict

object --+
         |
        dict
Known Subclasses:

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)

Instance Methods [hide private]
 
__cmp__(x, y)
cmp(x,y)
True if D has a key k, else False
__contains__(D, k)
 
__delitem__(x, y)
del x[y]
 
__eq__(x, y)
x==y
 
__ge__(x, y)
x>=y
 
__getattribute__(...)
x.__getattribute__('name') <==> x.name
 
__getitem__(x, y)
x[y]
 
__gt__(x, y)
x>y
 
__hash__(x)
hash(x)
new empty dictionary

__init__()
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
 
__iter__(x)
iter(x)
 
__le__(x, y)
x<=y
 
__len__(x)
len(x)
 
__lt__(x, y)
x<y
 
__ne__(x, y)
x!=y
a new object with type S, a subtype of T
__new__(T, S, ...)
 
__repr__(x)
repr(x)
 
__setitem__(x, i, y)
x[i]=y
None
clear(D)
Remove all items from D.
a shallow copy of D
copy(D)
New dict with keys from S and values equal to v
fromkeys(dict, S, v=...)
v defaults to None.
D[k] if k in D, else d
get(D, k, d=...)
d defaults to None.
True if D has a key k, else False
has_key(D, k)
list of D's (key, value) pairs, as 2-tuples
items(D)
an iterator over the (key, value) items of D
iteritems(D)
an iterator over the keys of D
iterkeys(D)
an iterator over the values of D
itervalues(D)
list of D's keys
keys(D)
v, remove specified key and return the corresponding value
pop(D, k, d=...)
If key is not found, d is returned if given, otherwise KeyError is raised
(k, v), remove and return some (key, value) pair as a
popitem(D)
2-tuple; but raise KeyError if D is empty
D.get(k,d), also set D[k]=d if k not in D
setdefault(D, k, d=...)
None
update(D, E, **F)
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]
list of D's values
values(D)
Method Details [hide private]

__getattribute__(...)

 

x.__getattribute__('name') <==> x.name

Overrides: object.__getattribute__

__hash__(x)
(Hashing function)

 

hash(x)

Overrides: object.__hash__

__init__()
(Constructor)

 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Returns:
new empty dictionary

Overrides: object.__init__

__new__(T, S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__

__repr__(x)
(Representation operator)

 

repr(x)

Overrides: object.__repr__