Fun with generators

Discussion in 'Python' started by Kay Schluehr, Nov 16, 2006.

  1. Kay Schluehr

    Kay Schluehr Guest

    While this has been possible before and I guess ( from somewhat
    superficial reading ) Michael Sparks Kamaelia project is all about this
    kind of stuff, Python 2.5 generators can be used trivially to turn
    higher order functions like reduce or map into generators producing
    streams. After reading a thread here on comp.lang.python initiated by
    someone who gets nervous about reduce() is going away in Py3K one might
    just respond that it's not a big deal: functions are out anyway,
    dataflow and coroutines are in :)

    http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/498264
    Kay Schluehr, Nov 16, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andy Fish
    Replies:
    65
    Views:
    1,732
    Mabden
    May 18, 2004
  2. Rhino
    Replies:
    4
    Views:
    5,672
    Roedy Green
    Jan 13, 2006
  3. Pavel

    Code Generators

    Pavel, May 14, 2006, in forum: Java
    Replies:
    7
    Views:
    713
    dimitar
    May 19, 2006
  4. dolphin
    Replies:
    4
    Views:
    315
    Jorgen Grahn
    Aug 25, 2007
  5. er
    Replies:
    2
    Views:
    503
Loading...

Share This Page