]> granicus.if.org Git - python/commitdiff
Build properties using lambdas. This makes test_pyclbr pass again, because it does...
authorGeorg Brandl <georg@python.org>
Sun, 1 Aug 2010 06:32:55 +0000 (06:32 +0000)
committerGeorg Brandl <georg@python.org>
Sun, 1 Aug 2010 06:32:55 +0000 (06:32 +0000)
Lib/pydoc.py

index 4f2288710e43f1a874bcf59b26a77e07136d8b36..dcb4737b50b4e8169762f8a25eae042ac0dca379 100755 (executable)
@@ -1699,13 +1699,8 @@ class Helper:
         self._input = input
         self._output = output
 
-    @property
-    def input(self):
-        return self._input or sys.stdin
-
-    @property
-    def output(self):
-        return self._output or sys.stdout
+    input  = property(lambda self: self._input or sys.stdin)
+    output = property(lambda self: self._output or sys.stdout)
 
     def __repr__(self):
         if inspect.stack()[1][3] == '?':