<div class="gmail_quote">On Fri, Sep 30, 2011 at 8:05 AM, nicky van foreest <span dir="ltr">&lt;<a href="mailto:vanforeest@gmail.com">vanforeest@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I tried the following, but this failed.<br>
<br>
class Batch(trellis.Component):<br>
    trellis.attrs(<br>
        prevs = trellis.Set([],<br>
        duration = 0,<br>
    )<br>
 ...<br>
 The problem is that all batches use the same trellis.Set, but I want<br>
each batch to have its own trellis.Set. How can I achieve this?</blockquote><div><br></div><div>I&#39;ll go ahead and just answer this bit, because it&#39;s the part I can understand without more detailed study.  Hopefully it&#39;ll get you what you need.  ;-)</div>
<div><br></div><div>Do this:</div><div><br></div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">class Batch(trellis.Component):<br>     prevs = trellis.make(trellis.Set)<br>     duration = trellis.attr(0)<br>
</font><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"> (I know that removing an item from a trellis.set is impossible. </blockquote><div><br>
</div><div>Uh, what?  Where&#39;d you get that idea?</div><div> </div></div>