Here is a more in depth link: http://stackoverflow.com/questions/1894209/how-to-read-menta...
but the idea is, delete all the parentheses from you mind, the code should still make sense. The parentheses are to help the computer out, not you.
http://gr.ayre.st/s/images/parens.png
I can still see them if I need to but they have the same visual weight as tabs/end of line spaces. I like this because it makes it feel more like python to me.
I'm building a stream-processing system much like Riemann in Python and the user configuration is built on co-routines. The stream is a graph of co-routines essentially (although typically with only one input and many possible buckets). I tend to think of it as data flowing through functions.
It might look like:
stream = when(lambda event: event['metric'] > 2.0,
by(lambda event: (event['host'], event['metric']),
rollup(5, email("example@foo.com")),
every(7200, alert("555-555-5555"))))
Which is a very simple graph of co-routines. And maybe that's what's different from you library (ie: it's not doing anything with intermediate values, but Python has a rich number of libraries providing various executor strategies).Anyway I wasn't suggesting Graph was somehow trivial or something. The OP claims to be a Python programmer and I was suggesting Python options.