Newbie question.

Pablo Prieto pablo.prieto at dulcesol.es
Tue Jun 6 07:27:37 EDT 2000


Hi all of you there!

#This is my question

AYS = ""

def setEnviroment():
  AYS = "NUMBER 9"

def getEnviroment():
  return AYS

#This is the end...

The function getEnviroment always return "". I guess AYS is declared
twice, One is module-scope and the other is local to setEnviroment, so
I've got two differents variables.

How can I make the variable AYS global to setEnviroment, so I'd be able
to return "NUMBER 9" in getEnviroment?. (Don't say return "NUMBER9".
I'll get annoyed :))

Well, Have a nice summer all of you (or Winter if you are in the other
side of the floor).

Pablo.




More information about the Python-list mailing list