Re: trellis.Set.discard
"Sergey Schetinin" <[email protected]>
| Newsgroups | gmane.comp.python.peak |
|---|---|
| Message-ID | <[email protected]> |
It's not that different from .remove though..
Anyway here's a test:
class CV(Component):
v = attr(False)
s = make(Set)
@maintain
def maintain(self):
if self.v:
self.s.add(1)
else:
self.s.discard(1)
@perform
def perform(self):
print self.v
@TaskCell
def task():
cv = CV()
cv.v = True
yield Pause
EventLoop.run()
It silently undoes the task changes. I would have expected at least an
exception.