Re: Re: trellis.Set.discard

"Phillip J. Eby" <pje-Wh6+Hckhi6HFNGf7iClzIwC/[email protected]>
Newsgroups gmane.comp.python.peak
Message-ID <[email protected]>
At 05:27 AM 11/1/2008 +0200, Sergey Schetinin wrote:
>Sorry to bother you if this was answered already, but that will only
>fix the readonly issue, right?
>
>This one:
>
>class C(Component):
>     x = attr()
>     @maintain
>     def rule(self):
>         self.x = 10
>
>@atomically
>def test():
>     C().x = 1
>
>and the new discrete rules not resetting immediately after init are
>still outstanding, correct?

Correct.


>Any decision on those?

I suppose it might work to have new cells' _finish() methods called 
at the end of a component creation "transaction".  That would fix 
both problems, I think.  (Though I'm not sure it would work correctly 
for new discretes with active readers, as a changed() call occurs in 
that case, and would result in some of the newly scheduled cells 
being recalculated.)

I'll need to think about it some more when I go back to working on this.
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.