[PEAK] Re: trellis.Set.discard

Sergey Schetinin maluke at gmail.com
Tue Oct 21 13:58:00 EDT 2008

Hahaha... I found out that my problems with reproducing some of the
issues are because I forgot that I fixed them with this (there goes
explicitness of side-txn =)):

from peak.rules import around

def make_cell(next_method, self, typ, ob, name):
    if ctrl.readonly:
        return side_txn(next_method, self, typ, ob, name)
        return next_method(self, typ, ob, name)

Here's another test:

class C1(Component):
    x = attr()

    def rule(self):
        self.x = 1

class C2(Component):
    c1 = make(C1)

    def calc(self):
        return self.c1.x

c = C2()

@make is triggered inside compute, so C1.rule ends up running with

More information about the PEAK mailing list