I suspect what the OP wants is to evaluate "Constants.DEFAULT_VALUE"
at function call time, not function definition time.
Indeed, something like the following does not work:
def someFunction(option=Constants.DEFAULT_VALUE):
print 'the option was', option
class Constants:
DEFAULT_VALUE = 13
someFunction()
In fact:
class Constants:
DEFAULT_VALUE = 13
def someFunction(option=Constants.DEFAULT_VALUE):
print 'the option was', option
Constants.DEFAULT_VALUE = 7 # get luckier
someFunction()
prints 13, not the possibly desired 7.
Should be:
def blip(test=Const.someVal):
i checked this out, and i think its the name you were using:
Const
Nope, it is the missing arg name.