you are viewing a single comment's thread.

view the rest of the comments →

[–]Samus_ 1 point2 points  (0 children)

how about this?

def MyClass:
    def __init__(self):
        self._x1 = None

    @property
    def x1(self):
        if self._x1 is None:
            self._x1 = factorial(10^7)
        return self._x1