mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 05:31:20 +00:00 
			
		
		
		
	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:
		
							parent
							
								
									7905d61b2c
								
							
						
					
					
						commit
						76ae397583
					
				
					 1 changed files with 2 additions and 7 deletions
				
			
		|  | @ -1699,13 +1699,8 @@ def __init__(self, input=None, output=None): | |||
|         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] == '?': | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Georg Brandl
						Georg Brandl