Py3's `shelve` is more restrictive, requiring keys to be `str`, whereas Py2 allows any hashable type. E.g.: s = Shelf({}) s[1] = 'one' # raises AttributeError in py3, but it's OK in Py2