[PEAK] A few issues and suggestions

Sergey Schetinin maluke at gmail.com
Mon Nov 3 21:51:16 EST 2008


> Thanks for your help identifying and fixing the problems.  I've checked in
> fixes, as described here:
>
> http://svn.eby-sarna.com?rev=2595&view=rev

Thanks a lot. However, I see that some problems, that I thought was
related to my monkeypatching, didn't go away, what happens in effect
is that changes done Component.__init__ get rolled back. I'm working
on a test case for this, and I've noticed something I didn't think
about before. In the following example __init__ reads data it
shouldn't. This isn't a problem normally, but something to keep in
mind when writing components' __init__

class TC(Component):
    y = attr(0)

    def __init__(self):
        print self.read # 0

    @compute
    def read(self):
        return self.y

    @maintain
    def write(self):
        self.y = 5



More information about the PEAK mailing list