@@ -106,10 +106,10 @@ def copy(x):
106106
107107def _copy_immutable (x ):
108108 return x
109- for t in (types . NoneType , int , float , bool , complex , str , tuple ,
109+ for t in (type ( None ) , int , float , bool , complex , str , tuple ,
110110 bytes , frozenset , type , range , slice , property ,
111- types .BuiltinFunctionType , types . EllipsisType ,
112- types .NotImplementedType , types . FunctionType , weakref .ref ):
111+ types .BuiltinFunctionType , type ( Ellipsis ), type ( NotImplemented ) ,
112+ types .FunctionType , weakref .ref ):
113113 d [t ] = _copy_immutable
114114t = getattr (types , "CodeType" , None )
115115if t is not None :
@@ -181,9 +181,9 @@ def deepcopy(x, memo=None, _nil=[]):
181181
182182def _deepcopy_atomic (x , memo ):
183183 return x
184- d [types . NoneType ] = _deepcopy_atomic
185- d [types . EllipsisType ] = _deepcopy_atomic
186- d [types . NotImplementedType ] = _deepcopy_atomic
184+ d [type ( None ) ] = _deepcopy_atomic
185+ d [type ( Ellipsis ) ] = _deepcopy_atomic
186+ d [type ( NotImplemented ) ] = _deepcopy_atomic
187187d [int ] = _deepcopy_atomic
188188d [float ] = _deepcopy_atomic
189189d [bool ] = _deepcopy_atomic
0 commit comments