@_FFI.callback(u'Value(ExternContext*, Value**, uint64_t, bool)')
def extern_store_list(context_handle, vals_ptr_ptr, vals_len, merge):
 c = _FFI.from_handle(context_handle)
 vals = tuple((c.from_value(val) for val in _FFI.unpack(vals_ptr_ptr, vals_len)))
 if merge:
  merged_set = set()
  def merged():
   for outer_val in vals:
    for inner_val in outer_val:
     if (inner_val in merged_set):
      continue
     merged_set.add(inner_val)
     (yield inner_val)
  vals = tuple(merged())
 return c.to_value(vals)

@ _FFI . callback ( u'Value(ExternContext*, Value**, uint64_t, bool)' ) def extern_store_list ( context_handle , vals_ptr_ptr , vals_len , merge ) : c = _FFI . from_handle ( context_handle ) vals = tuple ( ( c . from_value ( val ) for val in _FFI . unpack ( vals_ptr_ptr , vals_len ) ) ) if merge : merged_set = set ( ) def merged ( ) : for outer_val in vals : for inner_val in outer_val : if ( inner_val in merged_set ) : continue merged_set . add ( inner_val ) ( yield inner_val ) vals = tuple ( merged ( ) ) return c . to_value ( vals )
given storage and an array of values .