pygeodesy.named.ADict

Package pygeodesy :: Module named :: Class ADict |
[frames] | no frames]

# Class ADict

    object --+
             |
          dict --+
                 |
                ADict

Known Subclasses:
  - karney.GDict
  - , _NamedDict
  - , geodesici.XDict
  - , deprecated.classes.XDist
  - , auxilats._CX_Rs._Rcoeffs

A `dict` with both key and attribute access to the `dict` items.

Instance Methods
__getattr__(self, name) Get the value of an item by `name`. |
__repr__(self) Default `repr(self)`. |
__setattr__(self, name, value) Set the value of a known item by `name`. |
__str__(self) Default `str(self)`. |
set_(self, iteration=None, **items) Add one or several new items or replace existing ones. |
toRepr(self, **prec_fmt) Like `repr(dict)` but with `name` prefix and with `floats` formatted by function pygeodesy.fstr. |
toStr(self, **prec_fmt) Like `str(dict)` but with `floats` formatted by function pygeodesy.fstr. |
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`, `viewitems`, `viewkeys`, `viewvalues` Inherited from `object`: `__delattr__`, `__format__`, `__reduce__`, `__reduce_ex__`, `__subclasshook__`

Class Variables
Inherited from `dict`: `__hash__`

Properties
| iteration Get the iteration number (`int`) or `None` if not available/applicable.
| typename Get this `ADict`'s type name (`str`).
Inherited from `object`: `__class__`

Method Details

### __repr__ (self) (Representation operator) |
Default `repr(self)`. Overrides: object.__repr__

### __setattr__ (self, name, value) |
Set the value of a known item by `name`. Overrides: object.__setattr__

### __str__ (self) (Informal representation operator) |
Default `str(self)`. Overrides: object.__str__

### set_ (self, iteration=None, **items) |
Add one or several new items or replace existing ones. Arguments: `iteration` - Optional `iteration` (`int`). `items` - One or more `name=value` pairs.

Property Details

### iteration Get the iteration number (`int`) or `None` if not available/applicable. Get method: iteration(self) - Get the iteration number (`int`) or `None` if not available/applicable. Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### typename Get this `ADict`'s type name (`str`). Get method: typename(self) - Get this `ADict`'s type name (`str`). Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.