From 76ae39758334f5d68c9ec9dcd7b405ca6ceae1dd Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 1 Aug 2010 06:32:55 +0000 Subject: [PATCH] Build properties using lambdas. This makes test_pyclbr pass again, because it does not think that input and output are methods anymore. --- Lib/pydoc.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Lib/pydoc.py b/Lib/pydoc.py index 4f2288710e..dcb4737b50 100755 --- a/Lib/pydoc.py +++ b/Lib/pydoc.py @@ -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] == '?': -- 2.40.0