[Zope] Session cleaning

Chris McDonough chrism@zope.com
Thu, 4 Apr 2002 15:21:51 -0500


Darn.  This is a bug.

For now, please use the "delete" method ala:

s = context.REQUEST.SESSION
s.set('key', 'value')
s.delete('key')

I will try to fix the bug for the next Zope release. :-(

Thanks!

- C

----- Original Message -----
From: "Richard Wesley" <hawkfish@electricfish.com>
To: <zope@zope.org>
Sent: Thursday, April 04, 2002 2:39 PM
Subject: [Zope] Session cleaning


> How do I remove a key from a session object?  If I try this:
>
> if SESSION.has_key('key'):
> del SESSION['key']
>
> I am told that SESSION does not support slicing.
>
> TIA,
> - rmgw
>
> http://www.electricfish.com/hawkfish/
>
> --------------------------------------------------------------------------
--
> Richard Wesley           Electric Fish, Inc.
hawkfish@electricfish.com
>
> "They have forgotten the simplest of pleasures - that of the child and
>    the unopened box." - Dukat in "Babylon 5: Atonement"
>
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>