[Python-checkins] r83384 - python/branches/py3k/Lib/pydoc.py

georg.brandl python-checkins at python.org
Sun Aug 1 08:32:55 CEST 2010


Author: georg.brandl
Date: Sun Aug  1 08:32:55 2010
New Revision: 83384

Log:
Build properties using lambdas.  This makes test_pyclbr pass again, because it does not think that input and output are methods anymore.

Modified:
   python/branches/py3k/Lib/pydoc.py

Modified: python/branches/py3k/Lib/pydoc.py
==============================================================================
--- python/branches/py3k/Lib/pydoc.py	(original)
+++ python/branches/py3k/Lib/pydoc.py	Sun Aug  1 08:32:55 2010
@@ -1699,13 +1699,8 @@
         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] == '?':


More information about the Python-checkins mailing list