def modifies_known_mutable(obj, attr):
 for (typespec, unsafe) in _mutable_spec:
  if isinstance(obj, typespec):
   return (attr in unsafe)
 return False

def modifies_known_mutable ( obj , attr ) : for ( typespec , unsafe ) in _mutable_spec : if isinstance ( obj , typespec ) : return ( attr in unsafe ) return False
this function checks if an attribute on a builtin mutable object would modify it if called .