Replace a module variable with a function call
gabriel.becedillas at gmail.com
gabriel.becedillas at gmail.com
Mon Feb 6 13:54:35 EST 2006
I have a module that defines a variable with a constant value and now I
need to make that value dynamic, without affecting module clients. In
other words, I need to call a function witout using parenthesis.
Example:
mymod.py----------------------
def value():
return "hi"
client.py--------------------------
import mymod
print mymod.value
Is there a way to do this ?
Thanks.
More information about the Python-list
mailing list