Package orm2 :: Package util :: Class stupid_dict
[hide private]
[frames] | no frames]

Class stupid_dict

source code

This class implements the mapping (dict) interface. It uses a simple list to store its data and sequential search to access it. It does not depend on __hash__() to manage contained objects. (See Python Reference Manual Chapter 3.3)

The actual data is stored in self.data as a list of tuples like (key, value).

See the docstring of orm2.sql._part for details on why this is here.

Instance Methods [hide private]
  __init__(self, initdata=[])
  __len__(self)
  __getitem__(self, which)
  __setitem__(self, which, what)
  __delitem__(self, which)
  __iter__(self)
  __contains__(self, which)
  __cmp__(self, other)
  __eq__(self, other)
  __repr__(self)
  clear(self)
  copy(self)
  get(self, which, default=None)
  has_key(self, which)
  items(self)
  iteritems(self)
  iterkeys(self)
  itervalues(self)
  keys(self)
  values(self)
  pop(self)
  popitem(self)
  setdefault(self, default)
  update(self, other)
Other must implement the mapping (i.e.

Method Details [hide private]

__init__(self, initdata=[])
(Constructor)

source code 
None

__len__(self)
(Length operator)

source code 
None

__getitem__(self, which)
(Indexing operator)

source code 
None

__setitem__(self, which, what)
(Index assignment operator)

source code 
None

__delitem__(self, which)
(Index deletion operator)

source code 
None

__iter__(self)

source code 
None

__contains__(self, which)
(In operator)

source code 
None

__cmp__(self, other)
(Comparison operator)

source code 
None

__eq__(self, other)
(Equality operator)

source code 
None

__repr__(self)
(Representation operator)

source code 
None

clear(self)

source code 
None

copy(self)

source code 
None

get(self, which, default=None)

source code 
None

has_key(self, which)

source code 
None

items(self)

source code 
None

iteritems(self)

source code 
None

iterkeys(self)

source code 
None

itervalues(self)

source code 
None

keys(self)

source code 
None

values(self)

source code 
None

pop(self)

source code 
None

popitem(self)

source code 
None

setdefault(self, default)

source code 
None

update(self, other)

source code 
Other must implement the mapping (i.e. dict) interface.