web.web.utils.Storage

Package web :: Package web :: Module utils :: Class Storage |
[hide private]
[frames] | no frames]

# Class Storage

source code

    object --+
             |
          dict --+
                 |
                Storage

Known Subclasses:
  - Counter
  - , template.TemplateResult

A Storage object is like a dictionary except `obj.foo` can be used in addition to `obj['foo']`.

    >>> o = storage(a=1)
    >>> o.a
    1
    >>> o['a']
    1
    >>> o.a = 2
    >>> o['a']
    2
    >>> del o.a
    >>> o.a
    Traceback (most recent call last):
        ...
    AttributeError: 'a'

Instance Methods | [hide private]
__delattr__(self, key) x.__delattr__('name') <==> del x.name | source code
__getattr__(self, key) | source code
__repr__(self) repr(x) | source code
__setattr__(self, key, value) x.__setattr__('name', value) <==> x.name = value | source code
Inherited from `dict`: `__cmp__`, `__contains__`, `__delitem__`, `__eq__`, `__ge__`, `__getattribute__`, `__getitem__`, `__gt__`, `__init__`, `__iter__`, `__le__`, `__len__`, `__lt__`, `__ne__`, `__new__`, `__setitem__`, `__sizeof__`, `clear`, `copy`, `fromkeys`, `get`, `has_key`, `items`, `iteritems`, `iterkeys`, `itervalues`, `keys`, `pop`, `popitem`, `setdefault`, `update`, `values` Inherited from `object`: `__format__`, `__reduce__`, `__reduce_ex__`, `__str__`, `__subclasshook__`

Class Variables | [hide private]
Inherited from `dict`: `__hash__`

Properties | [hide private]
Inherited from `object`: `__class__`

Method Details | [hide private]

### __delattr__(self, key) | source code
x.__delattr__('name') <==> del x.name Overrides: object.__delattr__ (inherited documentation)

### __repr__(self) (Representation operator) | source code
repr(x) Overrides: object.__repr__ (inherited documentation)

### __setattr__(self, key, value) | source code
x.__setattr__('name', value) <==> x.name = value Overrides: object.__setattr__ (inherited documentation)