Re: Re: trellis.Set.discard

"Phillip J. Eby" <pje-Wh6+Hckhi6HFNGf7iClzIwC/[email protected]>
Newsgroups gmane.comp.python.peak
Message-ID <[email protected]>
At 08:58 PM 10/21/2008 +0300, Sergey Schetinin wrote:
>Here's another test:
>
>class C1(Component):
>     x = attr()
>
>     @maintain
>     def rule(self):
>         self.x = 1
>
>class C2(Component):
>     c1 = make(C1)
>
>     @compute
>     def calc(self):
>         return self.c1.x
>
>
>c = C2()
>c.calc
>
>@make is triggered inside compute, so C1.rule ends up running with
>ctrl.readonly.

Hm.  ISTM that this is a bug in Component creation, in that it should 
push and restore read-onlyness.  The make() should be idempotent with 
respect to the @compute rule.  Are there any other use cases for side 
transactions?  So far it seems to me that the use cases are all just 
fixing Trellis bugs.  :)

By the way, thank you for reporting and investigating all these 
bugs.  Hopefully I'll have some time soon to fix them all, now that 
it's reasonably clear how to do so.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.