[Tutor] preventing KeyError from "%"

Lance E Sloan lsloan@umich.edu
Thu, 03 May 2001 12:11:57 -0400


Remco Gerlich wrote:
> You can't do that with the standard dictionary, so you have to roll your
> own, inherited from UserDict, i.e.:

Thank you very much.  After I sent my question to the list, I realized
that KeyError is an exception thrown by the dictionary object and not
necessarily a "%" problem.  I thought the solution might be something
like that, but I didn't know quite how to do it.

--
Lance E Sloan
Web Services, Univ. of Michigan: Full-service Web and database design,
development, and hosting.  Specializing in Perl & Python CGIs.
http://websvcs.itd.umich.edu/ - "Putting U on the Web"