Re: Exception handling with NameError

2010-11-06 Thread Peter Otten
Zeynel wrote: > On Nov 5, 1:26 pm, Peter Otten <[email protected]> wrote: > >> Of course I'm only guessing because you don't provide enough context. >> >> Peter > > Thanks. > > This is the problem I am having, in general: > > K = [] # a container list > K = ["A", "B"] > > ARCHIVE = [] # a lis

Re: Exception handling with NameError

2010-11-06 Thread Peter Otten
Dennis Lee Bieber wrote: >> The problem I am having is this: If I do: >> >> K = [] >> ARCHIVE = [] >> ARCHIVE.append(K) >> >> any time K is updated (user submits new input) the content of ARCHIVE >> is erased: >> > No, it is NOT erased... It is MUTATED... But he rebinds the ARCHIVE name. -- ht

Re: Exception handling with NameError

2010-11-05 Thread Zeynel
On Nov 5, 1:26 pm, Peter Otten <[email protected]> wrote: > Of course I'm only guessing because you don't provide enough context. > > Peter Thanks. This is the problem I am having, in general: K = [] # a container list K = ["A", "B"] ARCHIVE = [] # a list where items from K is archived ARCHIV

Re: Exception handling with NameError

2010-11-05 Thread Peter Otten
Zeynel wrote: > I want to append new input to list SESSION_U without erasing its > content. I try this: > > ... > try: > SESSION_U.append(UNIQUES) > except NameError: > SESSION_U = [] > SESSION_U.append(UNIQUES) > ... > I would think that at fir