How to set local variables in a method

TommyS tommy.skeide at
Tue Jan 29 14:16:19 CET 2002

A beginners question...
I intend to set the variables a and b in the getvalues method.. Does
anyone know how to do this??

class test:
 	def calculate(self):
 		a,b = 0,0
 		z = # what to put here???
 		print a + b 
 	def getvalues(self,z):
 		z['a'] = 2

Thanks a lot!

More information about the Python-list mailing list