mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	Patch #1194449: correctly detect unbound methods in pydoc.
This commit is contained in:
		
							parent
							
								
									03b90d8cfd
								
							
						
					
					
						commit
						7e2b6bb24f
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		|  | @ -855,7 +855,7 @@ def docroutine(self, object, name=None, mod=None, | ||||||
|                 if imclass is not cl: |                 if imclass is not cl: | ||||||
|                     note = ' from ' + self.classlink(imclass, mod) |                     note = ' from ' + self.classlink(imclass, mod) | ||||||
|             else: |             else: | ||||||
|                 if object.im_self: |                 if object.im_self is not None: | ||||||
|                     note = ' method of %s instance' % self.classlink( |                     note = ' method of %s instance' % self.classlink( | ||||||
|                         object.im_self.__class__, mod) |                         object.im_self.__class__, mod) | ||||||
|                 else: |                 else: | ||||||
|  | @ -1226,7 +1226,7 @@ def docroutine(self, object, name=None, mod=None, cl=None): | ||||||
|                 if imclass is not cl: |                 if imclass is not cl: | ||||||
|                     note = ' from ' + classname(imclass, mod) |                     note = ' from ' + classname(imclass, mod) | ||||||
|             else: |             else: | ||||||
|                 if object.im_self: |                 if object.im_self is not None: | ||||||
|                     note = ' method of %s instance' % classname( |                     note = ' method of %s instance' % classname( | ||||||
|                         object.im_self.__class__, mod) |                         object.im_self.__class__, mod) | ||||||
|                 else: |                 else: | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Georg Brandl
						Georg Brandl