Пример #1
0
def dyn_array_as_list(arr):
    out = []
    for i in range(arr.len):
        out.append(ffi.string(arr.arr[i]))
    return out
Пример #2
0
 def __getitem__(self, key):
     value = self.__getptr__(key)
     if value == trie_ffi.NULL:
         raise KeyError(key)
     else:
         return trie_ffi.string(value)