Re: Dataflow programming in Python

2009-09-12 Thread Anh Hai Trinh
> Does it have any advantage to generator comprehension? > > import re > mm = mapmethod('strip')        # Is mapmethod something in the stdlib? > pat = re.compile('[Pp]attern') > result = (mm(line) for line in open('log') if pat.search(line)) > > which is also lazy Generator expression accomplishe

Re: Dataflow programming in Python

2009-09-11 Thread Lie Ryan
Anh Hai Trinh wrote: Hello all, I just want to share with you something that I've worked on recently. It is a library which implements streams -- generalized iterators with a pipelining mechanism and lazy-evaluation to enable data-flow programming in Python. The idea is to be able to take the o

Dataflow programming in Python

2009-09-11 Thread Anh Hai Trinh
Hello all, I just want to share with you something that I've worked on recently. It is a library which implements streams -- generalized iterators with a pipelining mechanism and lazy-evaluation to enable data-flow programming in Python. The idea is to be able to take the output of a function tha