On Dec 20, 2005, at 12:36 AM, Dennis Allison wrote:

The interaction between sessions, conflicts, and persistence is a bit
confusing.  I am still trying to understand the code in depth.

One thing is for sure, request.SESSION and/or request['SESSION'] must be persistent for things to work. Mutable objects in the session variable
set (dictionaries and lists) have to be handled specially to get the
persistence machinery to recognize they have been changed.

In this case, I am trying to ensure that the session variables get
identified as persistent.  My question is whether using update (an
implicit assignment) triggers the persistence mechanism.  It is the
moral equivalent of writing

        request['SESSION']['alpha'] = 'a'B
        request['SESSION']['beta'] = 'b'

but I am unsure whether the persistence mechanism will recognize it as

The implementation of TransientObjects's update method is:

    def update(self, d):
        self._p_changed = 1
        for k in d.keys():
            self[k] = d[k]

So yes...

- C

Zope-Dev maillist  -  Zope-Dev@zope.org
**  No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )

Reply via email to