I cannot figure out how to assign a variable based on the output of a function. I basically want to do this in my __init__
method
def square(x):
y = x * x
return y
toSquare = 10
result = square(toSquare)
My init method looks like this
def __init__(self):
self.init(
hash = sp.bytes('0x'),
nat_value = self.somefunction(), <-this does not work
)