I wrote a static method in python which takes time to compute but I want it to compute just one time and after that return the computed value. What should I do ? here is a sample code :
class Foo:
@staticmethod
def compute_result():
#some time taking process
Foo.compute_result() # this may take some time to compute but store results
Foo.compute_result() # this method call just return the computed result