Since this has come up on IRC briefly, I'll just post one possible
piece of syntactic
sugar I'm considering. Specifically I'm thinking of a decorator for
converting generators
into generator components.

For example, something like:
@GeneratorComponent(Inboxes = ["inbox", "control"],
                    Outboxes = ["outbox", "signal"])
def Tracer(self):
    while 1:
        for msg in self.Inbox("inbox"):
            print self.tag, str(msg)
            self.send(msg, "outbox")
        self.pause()
        yield 1

To be similar to:

class TaggedTracer(Axon.Component.component):
    tag = "> "
    def main(self):
        while not self.dataReady("control"):
            for msg in self.Inbox("inbox"):
                print self.tag, str(msg)
                self.send(msg, "outbox")
            self.pause()
            yield 1

Any thoughts welcome.


Michael.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"kamaelia" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/kamaelia?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to