title: pycapnp: Reading and Writing a List without custom capnp file
body: <p>I have read through the <a href="https://capnproto.github.io/pycapnp/quickstart.html" rel="nofollow noreferrer">pycapnp quickstart</a> and docs, and I see no mention for how to read and write basic list objects (like a list of floats).</p>
  <p>In particular, I am aware that if I write a custom type in a capnp file, then I can read an object of that type using something like</p>
  <pre><code>addressbook_capnp.Person.from_bytes(encoded_message)
  </code></pre>
  <p>What I would like to know is the syntax for reading a list of floats like this. I imagine that it would look something like</p>
  <pre><code>capnp.List.Float64.from_bytes(encoded_message)
  </code></pre>
  <p>But I simply can't find the correct syntax. Furthermore, since Capn Proto does not export aliases from the .capnp file, I cannot just define a list of floats there (or so it seems).</p>
  <p>Can somebody please tell me the correct syntax for reading, writing, and creating lists of basic objects in pycapnp?</p>
  <hr />
  <p>EDIT:</p>
  <p>For example, in C++ I can create a list object (without a custom type) like this:</p>
  <pre><code>::capnp::MallocMessageBuilder message; 
  auto capnp_point_cloud = message.initRoot&lt;::capnp::List&lt;Val&gt;&gt;(num_axes);
  for (size_t i = 0; i &lt; num_axes; ++i) { 
      capnp_point_cloud.set(i, array[i]);
  }
  </code></pre>