mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 21:51:50 +00:00 
			
		
		
		
	update docstring per the extension package fix, refactor
This commit is contained in:
		
							parent
							
								
									ac9f2f3de3
								
							
						
					
					
						commit
						731d48a65f
					
				
					 2 changed files with 1681 additions and 1673 deletions
				
			
		|  | @ -1102,13 +1102,10 @@ def load_module(self, fullname): | ||||||
|             raise |             raise | ||||||
| 
 | 
 | ||||||
|     def is_package(self, fullname): |     def is_package(self, fullname): | ||||||
|         """Return False as an extension module can never be a package.""" |         """Return if the extension module is a package.""" | ||||||
|         file_name = _path_split(self.path)[1] |         file_name = _path_split(self.path)[1] | ||||||
|         for suffix in EXTENSION_SUFFIXES: |         return any(file_name == '__init__' + suffix | ||||||
|             if file_name == '__init__' + suffix: |                    for suffix in EXTENSION_SUFFIXES) | ||||||
|                 return True |  | ||||||
|         else: |  | ||||||
|             return False |  | ||||||
| 
 | 
 | ||||||
|     def get_code(self, fullname): |     def get_code(self, fullname): | ||||||
|         """Return None as an extension module cannot create a code object.""" |         """Return None as an extension module cannot create a code object.""" | ||||||
|  |  | ||||||
							
								
								
									
										3345
									
								
								Python/importlib.h
									
										
									
									
									
								
							
							
						
						
									
										3345
									
								
								Python/importlib.h
									
										
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Philip Jenvey
						Philip Jenvey