[Tutor] valueOf() equivalent

Darrell Brogdon darrell@brogdon.net
Tue, 19 Dec 2000 19:06:14 -0500


Is there a Python equivalent to the Java "valueOf()" method?  For 
example, I want to be able to determine the value of 'tmp_var' in the 
following function:

test_variable = 2

def myTestFunction(tmp_var, count_var):
   if( tmp_var == count_var ):
       print "Match!"
   else:
       print "No match"

myTestFunction('test_variable', 5)