From: Georg Brandl Date: Sun, 1 Aug 2010 06:32:55 +0000 (+0000) Subject: Build properties using lambdas. This makes test_pyclbr pass again, because it does... X-Git-Tag: v3.2a2~583 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=76ae39758334f5d68c9ec9dcd7b405ca6ceae1dd;p=python Build properties using lambdas. This makes test_pyclbr pass again, because it does not think that input and output are methods anymore. --- 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] == '?':