diff --git a/capnp/lib/capnp.pyx b/capnp/lib/capnp.pyx index 41f7b50..1f9ab02 100644 --- a/capnp/lib/capnp.pyx +++ b/capnp/lib/capnp.pyx @@ -873,10 +873,10 @@ cdef _to_dict(msg, bint verbose, bint ordered): return msg + cdef _from_list(_DynamicListBuilder msg, list d): - cdef size_t count = 0 - for i in range(len(d)): - msg._set(i, d[i]) + for i, x in enumerate(d): + msg._set(i, x) cdef class _DynamicEnum: