[ZODB-Dev] RFC: Remove KeyError as base class of POSKeyError

Jim Fulton jim at zope.com
Thu Dec 15 16:51:43 UTC 2011


POSKeyError subclasses KeyError.  While this makes sense conceptually,
it's really unfortunate in practice.  Application code that catches
key errors when getting an item from a container, will unintentionally
hide POSKeyErrors.

I propose to remove KeyError as a base class of POSKeyError.  While
this is a backward incompatible change, I can't imagine unbroken code
that intentionally catches POSKeyErrors via KeErrors.

If there are no objections, I'll make this change in 3.11.

JIm

--
Jim Fulton
http://www.linkedin.com/in/jimfulton


More information about the ZODB-Dev mailing list