KeyError

A KeyError is raised when a look-up in a mapping fails.

You can see that here when we look up a non-existent key in a dict:

>>> codes = dict(gb=44, us=1, no=47, fr=33, es=34)
>>> codes['de']
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
KeyError: 'de'
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset