diff options
author | Georg Brandl <georg@python.org> | 2010-08-01 06:32:55 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2010-08-01 06:32:55 (GMT) |
commit | 76ae39758334f5d68c9ec9dcd7b405ca6ceae1dd (patch) | |
tree | f869145d740593e13768fd0fd975ac5c352d58fa /Lib/pydoc.py | |
parent | 7905d61b2cff841dfdc79bfca92ce23c717ab384 (diff) | |
download | cpython-76ae39758334f5d68c9ec9dcd7b405ca6ceae1dd.zip cpython-76ae39758334f5d68c9ec9dcd7b405ca6ceae1dd.tar.gz cpython-76ae39758334f5d68c9ec9dcd7b405ca6ceae1dd.tar.bz2 |
Build properties using lambdas. This makes test_pyclbr pass again, because it does not think that input and output are methods anymore.
Diffstat (limited to 'Lib/pydoc.py')
-rwxr-xr-x | Lib/pydoc.py | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/Lib/pydoc.py b/Lib/pydoc.py index 4f22887..dcb4737 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] == '?': |