Name Error
D-Man
dsh8290 at rit.edu
Wed Jan 3 17:39:12 EST 2001
Python 2.0 will have the same problem with that code. At the
beginning of the function write:
global stored_data
Then the interpreter will know which scope it is in so that the
assignment will assign to the global one, rather than create a new
local one.
HTH,
-D
On Wed, Jan 03, 2001 at 02:13:51PM -0800, Curtis Jensen wrote:
<snip>
>
> def send_data():
<snip>
> #clear stored_data
> stored_data = []
> #end def send_data
More information about the Python-list
mailing list