I have two classes for in case:
testing.py :
class Functions:
def mapping(func, x):
return func(x)
and I try to run the code below:
import testing
def doubleMe(data):
return data * data
res = stream.Functions.map(testdouble, [1,2,3,4,5])
print res
After I try to run the code, I got the error
TypeError: unbound method mapping() must be called with Functions instance as first argument (got function instance instead)
I not too sure what what have went wrong here, can I have some advise? Thanks!