mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 19:34:08 +00:00 
			
		
		
		
	Issue #24713: Use importlib.reload() in import reference document.
imp.reload() was deprecated in Python 3.4 and changed to call importlib.reload(). Patch by Petr Viktorin.
This commit is contained in:
		
							parent
							
								
									eaf16abc68
								
							
						
					
					
						commit
						7e732a7181
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -200,7 +200,7 @@ of the module to result in an :exc:`ImportError`.
 | 
				
			||||||
Beware though, as if you keep a reference to the module object,
 | 
					Beware though, as if you keep a reference to the module object,
 | 
				
			||||||
invalidate its cache entry in :data:`sys.modules`, and then re-import the
 | 
					invalidate its cache entry in :data:`sys.modules`, and then re-import the
 | 
				
			||||||
named module, the two module objects will *not* be the same. By contrast,
 | 
					named module, the two module objects will *not* be the same. By contrast,
 | 
				
			||||||
:func:`imp.reload` will reuse the *same* module object, and simply
 | 
					:func:`importlib.reload` will reuse the *same* module object, and simply
 | 
				
			||||||
reinitialise the module contents by rerunning the module's code.
 | 
					reinitialise the module contents by rerunning the module's code.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue