def dyn_array_as_list(arr): out = [] for i in range(arr.len): out.append(ffi.string(arr.arr[i])) return out
def __getitem__(self, key): value = self.__getptr__(key) if value == trie_ffi.NULL: raise KeyError(key) else: return trie_ffi.string(value)