[ Dylan Reinhardt]
Look extra carefully at any and all assignments you make in the external method. In particular, it's possible you may have committed a common error with lists, ex:
a = [1,2.3] b = a b = None # now the value of a is None!
That is not right. a retains its value as expected. To prove it, here's a transcript from an IDLE session, with Py2.1.3 -
a = [1,2,3] b=a print b [1, 2, 3] b=None print a [1, 2, 3]
Even when you start with a=b=[1,2,3] a still remains when you set b to None. You must be mixing this up with some other situation in which both and b have a reference to the same list, and a changed value in one then shows up in the other. For example -
a=b=[1,2,3] a.append(4) print b [1, 2, 3, 4]
This is different from re-assigning the variable to reference something else like None. Cheers, Tom P