Avoid being clever even when there are APIs to support it

Jim Fulton <[email protected]>
Newsgroups gmane.comp.web.zope.zodb
Message-ID <CAPDm-FhT37+Zk7nyRLKu2FNL=KToj7KHocFV6BzfmCn6gSfvCw@mail.gmail.com>
ZODB provides a number of APIs to support being clever.  Mostly these come
in the form of persistent-object methods that you can override, like
__setstate__/__getstate__ and some of the _p_ methods.  When I designed
these to be overridden, I was trying to support my own flawed cleverness.
(It took me a while to learn that being clever is usually not worth it.)  I
haven't overridden any of these methods in many years, while writing lots
of ZODB application code.

There may very rarely be cases where using these hooks make sense, but this
is very rare.

Jim

-- 
Jim Fulton
http://jimfulton.info

-- 
You received this message because you are subscribed to the Google Groups "zodb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.