diveintomark/diveintopython3 — Issue #4: Native datatypes: accessing a non-existing key
Author: tini
Created: 2012-01-27 11:42:09+00:00
State: open

In chapter "2.7.1 Creating A Dictionary" you could mention what happens if you try to access a non-existing key:

```
>>> a_dict = {'server': 'db.diveintopython3.org', 'database': 'mysql'}
>>> a_dict['foo']
Traceback (most recent call last):
File "", line 1, in
KeyError: 'foo'
```