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

This commit is contained in:
Georg Brandl 2010-08-01 06:32:55 +00:00
parent 7905d61b2c
commit 76ae397583

View File

@ -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] == '?':