Re: lazy evaluation is sometimes too lazy... help please.

Discussion in 'Python' started by Boris Borcic, Jan 16, 2009.

  1. Boris Borcic

    Boris Borcic Guest

    > itlist = (x+(i*10) for i,s in (i,count()) for x in s)

    oops, that would be

    itlist = (x+(i*10) for i,s in [(i,count())] for x in s)

    or equivalent, kind of ugly anyway.
    Boris Borcic, Jan 16, 2009
    #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. John Saunders
    Replies:
    0
    Views:
    455
    John Saunders
    Aug 28, 2003
  2. Nehmo Sergheyev
    Replies:
    1
    Views:
    495
    Andrew Urquhart
    May 9, 2004
  3. Marcin Vorbrodt

    ::std sometimes needed, sometimes not

    Marcin Vorbrodt, Sep 16, 2003, in forum: C++
    Replies:
    24
    Views:
    750
    Jerry Coffin
    Sep 17, 2003
  4. Ken Pu
    Replies:
    3
    Views:
    664
    Steven D'Aprano
    Jan 16, 2009
  5. Boris Borcic
    Replies:
    0
    Views:
    542
    Boris Borcic
    Jan 16, 2009
Loading...

Share This Page