I think the main issue is with the lists, which are mutable -- if all the variables refer to the same list and you mutate the list, all the variables will still refer to that changed list. If you want to be able to change one of the lists without affecting the others, then you need the separate assignments, as below.
Anthony On Wednesday, August 1, 2012 11:22:51 AM UTC-4, Annet wrote: > > Hi Anthony, > > This might help: >> http://inst.eecs.berkeley.edu/~selfpace/cs9honline/Q2/mutation.html. > > > That was helpful. > > As you know I am working on a network application, which is node i.e > nodeID driven. When nodeID's change I need a way to reset all variable's > stored in session, to use them in conditionals to test if they are False or > in order to assign new values to them. > > session.userNodeID gets assigned an id, session.userNodeName a string and > session.userNodeMembership a list, just like the menu and dropdown > variables. So I'd better do the following: > > session.userNodeID=0 > session.userNodeName='' > session.userNodeMembership=[] > session.cmsadmin_menu=[] > session.create_dropdown=[] > session.retrieve_dropdown=[] > > Don't I? > > Kind regards, > > Annet. > --

