parameters: (typ, val, c)
docstring: Reflect the native set's contents into the Python object.
docstring_summary: Reflect the native set's contents into the Python object.
docstring_tokens: Reflect the native set s contents into the Python object .
function: def reflect_set(typ, val, c):
      """
      Reflect the native set's contents into the Python object.
      """
      if not typ.reflected:
          return
      inst = setobj.SetInstance(c.context, c.builder, typ, val)
      payload = inst.payload
  
      with c.builder.if_then(payload.dirty, likely=False):
          obj = inst.parent
          # XXX errors are not dealt with below
          c.pyapi.set_clear(obj)
  
          # Build a new Python list and then update the set with that
          ok, listobj = _native_set_to_python_list(typ, payload, c)
          with c.builder.if_then(ok, likely=True):
              c.pyapi.set_update(obj, listobj)
              c.pyapi.decref(listobj)
  
          # Mark the set clean, in case it is reflected twice
          inst.set_dirty(False)
function_tokens: def reflect_set ( typ , val , c ) : if not typ . reflected : return inst = setobj . SetInstance ( c . context , c . builder , typ , val ) payload = inst . payload with c . builder . if_then ( payload . dirty , likely = False ) : obj = inst . parent # XXX errors are not dealt with below c . pyapi . set_clear ( obj ) # Build a new Python list and then update the set with that ok , listobj = _native_set_to_python_list ( typ , payload , c ) with c . builder . if_then ( ok , likely = True ) : c . pyapi . set_update ( obj , listobj ) c . pyapi . decref ( listobj ) # Mark the set clean, in case it is reflected twice inst . set_dirty ( False )