mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 19:34:08 +00:00 
			
		
		
		
	#14638: pydoc now treats non-str __name__ as None instead of raising
Original patch by Peter Otten.
This commit is contained in:
		
							parent
							
								
									88ec6209cf
								
							
						
					
					
						commit
						c43125a05c
					
				
					 3 changed files with 16 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -1525,7 +1525,8 @@ def resolve(thing, forceload=0):
 | 
			
		|||
            raise ImportError('no Python documentation found for %r' % thing)
 | 
			
		||||
        return object, thing
 | 
			
		||||
    else:
 | 
			
		||||
        return thing, getattr(thing, '__name__', None)
 | 
			
		||||
        name = getattr(thing, '__name__', None)
 | 
			
		||||
        return thing, name if isinstance(name, str) else None
 | 
			
		||||
 | 
			
		||||
def render_doc(thing, title='Python Library Documentation: %s', forceload=0,
 | 
			
		||||
        renderer=None):
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue