Kaydet (Commit) 76ae3975 authored tarafından Georg Brandl's avatar Georg Brandl

Build properties using lambdas. This makes test_pyclbr pass again, because it…

Build properties using lambdas.  This makes test_pyclbr pass again, because it does not think that input and output are methods anymore.
üst 7905d61b
...@@ -1699,13 +1699,8 @@ class Helper: ...@@ -1699,13 +1699,8 @@ class Helper:
self._input = input self._input = input
self._output = output self._output = output
@property input = property(lambda self: self._input or sys.stdin)
def input(self): output = property(lambda self: self._output or sys.stdout)
return self._input or sys.stdin
@property
def output(self):
return self._output or sys.stdout
def __repr__(self): def __repr__(self):
if inspect.stack()[1][3] == '?': if inspect.stack()[1][3] == '?':
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment