[Zope3-dev] Persistent module notes and proposal

Shane Hathaway shane at ZOPE.COM
Mon Jan 5 17:44:01 EST 2004


On Mon, 5 Jan 2004, Casey Duncan wrote:

> I continue to agree. So we either need to make it impossible to mutate
> module state (seems unlikely) or somehow make it clear that it is not a
> supported use or do nothing and expect many people to naively do the
> wrong thing and let them lose.

Zope could issue a warning when you check in code that defines simple
mutable things like lists or dictionaries at module scope.  Most users
would learn about the policy as soon as they write "registry = {}".

Incidentally, I think this policy (no mutables at module scope) might be
the very same policy that makes Zope 2's refresh functionality reliable.

Shane



More information about the Zope3-dev mailing list