parameters: (x, memo=None, _nil=[])
return_statement: return y
docstring: Deep copy operation on arbitrary Python objects.
  
      See the module's __doc__ string for more info.
docstring_summary: Deep copy operation on arbitrary Python objects.
docstring_tokens: Deep copy operation on arbitrary Python objects .
function: def deepcopy(x, memo=None, _nil=[]):
      """Deep copy operation on arbitrary Python objects.
  
      See the module's __doc__ string for more info.
      """
  
      if memo is None:
          memo = {}
  
      d = id(x)
      y = memo.get(d, _nil)
      if y is not _nil:
          return y
  
      cls = type(x)
  
      copier = _deepcopy_dispatch.get(cls)
      if copier:
          y = copier(x, memo)
      else:
          try:
              issc = issubclass(cls, type)
          except TypeError: # cls is not a class (old Boost; see SF #502085)
              issc = 0
          if issc:
              y = _deepcopy_atomic(x, memo)
          else:
              copier = getattr(x, "__deepcopy__", None)
              if copier:
                  y = copier(memo)
              else:
                  reductor = dispatch_table.get(cls)
                  if reductor:
                      rv = reductor(x)
                  else:
                      reductor = getattr(x, "__reduce_ex__", None)
                      if reductor:
                          rv = reductor(2)
                      else:
                          reductor = getattr(x, "__reduce__", None)
                          if reductor:
                              rv = reductor()
                          else:
                              raise Error(
                                  "un(deep)copyable object of type %s" % cls)
                  y = _reconstruct(x, rv, 1, memo)
  
      memo[d] = y
      _keep_alive(x, memo) # Make sure x lives at least as long as d
      return y
function_tokens: def deepcopy ( x , memo = None , _nil = [ ] ) : if memo is None : memo = { } d = id ( x ) y = memo . get ( d , _nil ) if y is not _nil : return y cls = type ( x ) copier = _deepcopy_dispatch . get ( cls ) if copier : y = copier ( x , memo ) else : try : issc = issubclass ( cls , type ) except TypeError : # cls is not a class (old Boost; see SF #502085) issc = 0 if issc : y = _deepcopy_atomic ( x , memo ) else : copier = getattr ( x , "__deepcopy__" , None ) if copier : y = copier ( memo ) else : reductor = dispatch_table . get ( cls ) if reductor : rv = reductor ( x ) else : reductor = getattr ( x , "__reduce_ex__" , None ) if reductor : rv = reductor ( 2 ) else : reductor = getattr ( x , "__reduce__" , None ) if reductor : rv = reductor ( ) else : raise Error ( "un(deep)copyable object of type %s" % cls ) y = _reconstruct ( x , rv , 1 , memo ) memo [ d ] = y _keep_alive ( x , memo ) # Make sure x lives at least as long as d return y