From: Paolo T. <Pao...@ma...> - 2001-04-23 12:21:31
|
Hi. I have some problem to set a moduel variable into a function. I worte the following python module: ##Module mymodule.py Count = 0 def get(): return Count def set(newc): Count = newc From prompt I type: >>> import mymodule >>> mymodule.get() 0 >>> mymodule.set(5) >>> mymodule.get() 0 I was expecting 5 ! Anyone knows my mistake ? Thank you in advance. Paolo. |