4 Responses

  1. Charalampos Papaloizou
    Charalampos Papaloizou November 12, 2013 at 11:44 PM | | Reply

    thank you for the article. i would rename filter to filter_ or something similar because of the builtin function.

    1. Dmitry Vakhrushev
      Dmitry Vakhrushev November 13, 2013 at 5:24 AM | | Reply

      It makes sense, but I never use built-in filter function. Thus I don’t care about hiding its name. I prefer the following syntax:

      [item for item in iterable if condition(item)]

  2. rVc
    rVc November 14, 2013 at 7:57 PM | | Reply

    i think a simpler example would be using a function that take the operations that need to be done in array & loop through it passing return value of one operation as argument to the next operation.
    Also using closures u can make a function that generate a pipeline function for each set of operations needed to be done.

    that way u will avoid ‘yield’, ‘send’ also u will have normal functions that could be used standalone away from pipeline.

    I don’t know much in python but enjoyed your article, thanks!

    1. Dmitry Vakhrushev
      Dmitry Vakhrushev November 19, 2013 at 6:00 AM | | Reply

      Yes, but the article won’t be about coroutines in that way 🙂

Leave a Reply