[swig-python] fix examples after e0c07d

KeySet.__getitem__ throws KeyError if key is missing
(see https://docs.python.org/3/reference/datamodel.html#object.__getitem__)

This fixes #1