def _native_set_to_python_list(typ, payload, c):
 nitems = payload.used
 listobj = c.pyapi.list_new(nitems)
 ok = cgutils.is_not_null(c.builder, listobj)
 with c.builder.if_then(ok, likely=True):
  index = cgutils.alloca_once_value(c.builder, ir.Constant(nitems.type, 0))
  with payload._iterate() as loop:
   i = c.builder.load(index)
   item = loop.entry.key
   itemobj = c.box(typ.dtype, item)
   c.pyapi.list_setitem(listobj, i, itemobj)
   i = c.builder.add(i, ir.Constant(i.type, 1))
   c.builder.store(i, index)
 return (ok, listobj)

def _native_set_to_python_list ( typ , payload , c ) : nitems = payload . used listobj = c . pyapi . list_new ( nitems ) ok = cgutils . is_not_null ( c . builder , listobj ) with c . builder . if_then ( ok , likely = True ) : index = cgutils . alloca_once_value ( c . builder , ir . Constant ( nitems . type , 0 ) ) with payload . _iterate ( ) as loop : i = c . builder . load ( index ) item = loop . entry . key itemobj = c . box ( typ . dtype , item ) c . pyapi . list_setitem ( listobj , i , itemobj ) i = c . builder . add ( i , ir . Constant ( i . type , 1 ) ) c . builder . store ( i , index ) return ( ok , listobj )
create a python list from a native sets items .