D
Decebal
I have the following class:
#####
class Dummy():
value = 0
def __init__(self, thisValue):
print thisValue
self.value = thisValue
value = thisValue
def testing(self):
print 'In test: %d' % self.value
def returnValue(self):
return self.value
result = someFuntion(default = value)
#####
But the last line does not work.
I would like to do a call like:
dummy = Dummy(thisValue = 12)
And that someFunction gets a default value of 12. How can I do that?
#####
class Dummy():
value = 0
def __init__(self, thisValue):
print thisValue
self.value = thisValue
value = thisValue
def testing(self):
print 'In test: %d' % self.value
def returnValue(self):
return self.value
result = someFuntion(default = value)
#####
But the last line does not work.
I would like to do a call like:
dummy = Dummy(thisValue = 12)
And that someFunction gets a default value of 12. How can I do that?