@reflect(types.Set)
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
  c.pyapi.set_clear(obj)
  (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)
  inst.set_dirty(False)

@ reflect ( types . Set ) 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 c . pyapi . set_clear ( obj ) ( 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 ) inst . set_dirty ( False )
reflect the native sets contents into the python object .