ipython/ipython — pull request #4276 by minrk (2013-09-25 22:36:40+00:00)
Title: Support container methods in config

Specifically:

- append, extend, insert on lists
- update on dicts
- update, add on sets

So you can do things like:

```python
phi = ( 1 + sqrt(5) ) / 2
width = 10.
c.InlineBackend.rc.update({'figure.figsize' : (width, width / phi)})
c.InteractiveShellApp.exec_lines.append('print ("hello")')
```

without having to copy the initial value, or check for its existence first.

The one thing that no longer works with this change is using

```python
try:
config.Class.trait
except AttributeError:
# not found
```

to check existence, because AttributeError will never be raised.
Instead, I have added '.' awareness to `__contains__`, so you can do:

```python
if 'Class.trait' not in config:
# not found
```

to ask the same question.