parameters: (x)
return_statement: return _reconstruct(x, rv, 0)
docstring: Shallow copy operation on arbitrary Python objects.
  
      See the module's __doc__ string for more info.
docstring_summary: Shallow copy operation on arbitrary Python objects.
docstring_tokens: Shallow copy operation on arbitrary Python objects .
function: def copy(x):
      """Shallow copy operation on arbitrary Python objects.
  
      See the module's __doc__ string for more info.
      """
  
      cls = type(x)
  
      copier = _copy_dispatch.get(cls)
      if copier:
          return copier(x)
  
      copier = getattr(cls, "__copy__", None)
      if copier:
          return copier(x)
  
      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(shallow)copyable object of type %s" % cls)
  
      return _reconstruct(x, rv, 0)
function_tokens: def copy ( x ) : cls = type ( x ) copier = _copy_dispatch . get ( cls ) if copier : return copier ( x ) copier = getattr ( cls , "__copy__" , None ) if copier : return copier ( x ) 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(shallow)copyable object of type %s" % cls ) return _reconstruct ( x , rv , 0 )