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"
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 )
OK, this is fixed in CVS... ----- Original Message ----- From: "Chris McDonough" <chrism@zope.com> To: <zope@zope.org>; "Richard Wesley" <hawkfish@electricfish.com> Sent: Thursday, April 04, 2002 3:21 PM Subject: Re: [Zope] Session cleaning
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
-------------------------------------------------------------------------- --
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 )
_______________________________________________ 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 )
At 3:21 PM -0500 4/4/02, Chris McDonough wrote:
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. :-(
Yep, that did it. Thanks for the workaround! - rmgw http://www.electricfish.com/hawkfish/ ---------------------------------------------------------------------------- Richard Wesley Electric Fish, Inc. hawkfish@electricfish.com "A little patience and a lot of tape!" - Danny DeVito, _Batman Returns_
participants (2)
-
Chris McDonough -
Richard Wesley