KeyError without [] harmful?
John J. Lee
jjl at pobox.com
Tue May 13 10:34:53 EDT 2003
"Edward C. Jones" <edcjones at erols.com> writes:
> John J. Lee wrote:
>
> > but actually works like (and is implemented in terms of) a 'two-level
> > dictionary' -- ie. a dictionary of dictionaries.
>
> Check out MultiDict.py at http://members.tripod.com/~edcjones/pycode.html
Well, that's interesting, but it doesn't answer my question.
Which was: Should methods other than __getitem__, __setitem__,
__delitem__ (and any others I've forgotten that involve []) ever raise
KeyError?
John
More information about the Python-list
mailing list