title: How to initialize a repeated element in protocol buffer?
body: <p>Assume that I have this message.</p>
  
  <pre><code>message A {
    repeated float w = 1 [packed = true];
  }
  </code></pre>
  
  <p>How can I initialize w in my Code? Can I do any better than this?</p>
  
  <pre><code>a = A()    
  for (int i = 0 ; i &lt; n; ++i) 
     a.add_w(0);
  </code></pre>