Nested lists with pycapnp

15 views
Skip to first unread message

Wichert Akkerman

unread,
Nov 27, 2020, 10:21:15 AM11/27/20
to Cap'n Proto
Hi everyone,

I have a schema that uses a two-dimensional list. The schema looks like this:

struct Feature {
  coordinates @4 :List(List(Float64));
}

Where coordinates will be a list of 2-item lists. I can initialise the outer list easily:

feature = geo_schema.Feature.new_message()
coordinates = feature.init("coordinates", 10)

But I can't seem to initialise the inner lists. Is there a trick I'm missing?

Regards,
Wichert.

Reply all
Reply to author
Forward
0 new messages