lukecampbell/pyon — pull request #5 by lukecampbell (2012-05-04 14:27:53+00:00)
Title: Adds capability to DotDict for dot-notation chaining and setattr

Adds utility to `DotDict` for chaining dot-notated set attribute operations.

Example:
```
>>> from pyon.util.containers import DotDict
>>> config = DotDict()
>>> config.servers.port = 80
>>> config.servers.hostname = 'localhost'
>>> config.logging.quiet = False
>>> config.example.of.chaining.long.attrs = True
>>> config.non_existent
Traceback (most recent call last):
File "", line 1, in
File "/Users/____/Documents/Dev/code/pyon/pyon/util/containers.py", line 74, in __getattr__
raise AttributeError(key)
AttributeError: non_existent
```
This could be a useful utility in the future and save on some superfluous coding.