mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 19:34:08 +00:00 
			
		
		
		
	Issue #9118: help(None) will now return NoneType doc instead of
starting interactive help.
This commit is contained in:
		
							parent
							
								
									766f5d9d73
								
							
						
					
					
						commit
						2e733c9625
					
				
					 1 changed files with 3 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -1705,8 +1705,9 @@ class Helper:
 | 
			
		|||
            return ''
 | 
			
		||||
        return '<pydoc.Helper instance>'
 | 
			
		||||
 | 
			
		||||
    def __call__(self, request=None):
 | 
			
		||||
        if request is not None:
 | 
			
		||||
    _GoInteractive = object()
 | 
			
		||||
    def __call__(self, request=_GoInteractive):
 | 
			
		||||
        if request is not self._GoInteractive:
 | 
			
		||||
            self.help(request)
 | 
			
		||||
        else:
 | 
			
		||||
            self.intro()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue