[ZODB-Dev] PersistentMapping

Thomas Lotze tl at gocept.com
Thu Nov 17 05:29:05 EST 2005


Hi,

I just noticed two things about persistent.PersistentMapping:

- It inherits from UserDict.UserDict. Is there any reason not to inherit
  from dict directly, given that this has been possible since Python 2.3
  IIRC? 

- Not all methods of the mapping interface are handled. In particular,
  there's no reason not to handle pop() as popitems() is handled.
  Unhandled methods that change the content of the dict lead to especially
  nasty bugs as they seem to work OK during a transaction while their
  effect is not permanent.

-- 
Thomas



More information about the ZODB-Dev mailing list