your mail
John J Lee
jjl at pobox.com
Tue May 13 12:23:56 EDT 2003
On Tue, 13 May 2003, Michael Chermside wrote:
> John J. Lee writes:
> > Strictly, I suppose it should raise ValueError if a dict lookup in
> > there fails, but part of me wants to just leave it at that and let the
> > KeyErrors propagate. Is that a wicked thought?
>
> I would say that _IF YOU DOCUMENT IT_ there's nothing wrong with
> using KeyError for this purpose. Practically, you could use any
[...]
> and NOT wanting to catch the error from mySortaDictThing. So I'd
> say, go for it, and don't feel wicked.
>
> But do document it.
Done.
Thanks for the reassurance.
John
More information about the Python-list
mailing list