summaryrefslogtreecommitdiff
path: root/Lib/pydoc.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2017-03-19 08:40:32 +0200
committerGitHub <noreply@github.com>2017-03-19 08:40:32 +0200
commitbdf6b910f9ea75609caee498a975af03b6d23f67 (patch)
treeac69902aaaeb9c2e0578181e911a36af201ea1a0 /Lib/pydoc.py
parentc85a26628ceb9624c96c3064e8b99033c026d8a3 (diff)
downloadcpython-git-bdf6b910f9ea75609caee498a975af03b6d23f67.tar.gz
bpo-29776: Use decorator syntax for properties. (#585)
Diffstat (limited to 'Lib/pydoc.py')
-rw-r--r--Lib/pydoc.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/Lib/pydoc.py b/Lib/pydoc.py
index 49555405c5..376c4459fe 100644
--- a/Lib/pydoc.py
+++ b/Lib/pydoc.py
@@ -1868,8 +1868,13 @@ class Helper:
self._input = input
self._output = output
- input = property(lambda self: self._input or sys.stdin)
- output = property(lambda self: self._output or sys.stdout)
+ @property
+ def input(self):
+ return self._input or sys.stdin
+
+ @property
+ def output(self):
+ return self._output or sys.stdout
def __repr__(self):
if inspect.stack()[1][3] == '?':