
class Result:

    def __init__(self, return_code, stdout, stderr):
        self.return_code = return_code
        self.stdout = stdout
        self.stderr = stderr
        self.succeeded = self.return_code == 0
        self.failed = not self.succeeded
        self.stdout_lines = stdout.splitlines() if stdout else []
        self.stderr_lines = stderr.splitlines() if stderr else []

@@ -1,8 +1,44 @@
+from ..util import cached_property%0A%0A
 %0Aclass R
@@ -287,36 +287,78 @@
 ded%0A
+%0A
     
-    self.stdout_lines = 
+@cached_property%0A    def stdout_lines(self):%0A        return self.
 stdo
@@ -376,16 +376,21 @@
 es() if 
+self.
 stdout e
@@ -400,36 +400,78 @@
  %5B%5D%0A
+%0A
     
-    self.stderr_lines = 
+@cached_property%0A    def stderr_lines(self):%0A        return self.
 stde
@@ -489,16 +489,21 @@
 es() if 
+self.
 stderr e

Make Result.stdout_lines and stderr_lines cached properties