[Zope] Core Session Tracking & DTML

Chris Withers chrisw@nipltd.com
Wed, 03 Jan 2001 14:33:04 +0000


Chris McDonough wrote:

> > sessionmanager.SessionData.a
> >
> > ...or something similar?
> 
> Yes.  That's what Bob S. suggested.  What are the benefits of this?

More graceful code that's more 'pythonesque' in Python Scripts:

if sessionmanager.SessionData.a['mykey'] == 1:
...as opposed to...
if sessionmanager.SessionData.get('a')['mykey'] == 1:

sessionmanager.SessionData.b = 1
...as opposed to...
if sessionmanager.SessionData.set('b',1)

cheers,

Chris