mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 23:21:29 +00:00 
			
		
		
		
	Fix running the copy module from the command-line (however use{ful,less} it may be).
This commit is contained in:
		
							parent
							
								
									b5cfd555b2
								
							
						
					
					
						commit
						d6399d2d19
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -51,6 +51,7 @@ class instances).
 | 
			
		|||
import types
 | 
			
		||||
import weakref
 | 
			
		||||
from copyreg import dispatch_table
 | 
			
		||||
import builtins
 | 
			
		||||
 | 
			
		||||
class Error(Exception):
 | 
			
		||||
    pass
 | 
			
		||||
| 
						 | 
				
			
			@ -109,7 +110,7 @@ def _copy_immutable(x):
 | 
			
		|||
if t is not None:
 | 
			
		||||
    d[t] = _copy_immutable
 | 
			
		||||
for name in ("complex", "unicode"):
 | 
			
		||||
    t = globals()['__builtins__'].get(name)
 | 
			
		||||
    t = getattr(builtins, name, None)
 | 
			
		||||
    if t is not None:
 | 
			
		||||
        d[t] = _copy_immutable
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue