News for hackers. Stuff that matters.
Re:Stop writing classes... by pjscott on Saturday March 17, 2012 @10:26PM (#3718919)
I notice that your first and second versions return an iterator, while your third and fourth versions return a list. So, you know, be aware of that. (If you want a version of map that doesn't force its arguments and produce a list, you can use itertools.imap. I wish it were a standard function so I didn't have to import it.)
Re:Stop writing classes... by masklinn on Sunday March 18, 2012 @04:45AM (#3719384)
> you can use itertools.imap. I wish it were a standard function so I didn't have to import it.)

In Python 3 it is (the `map` builtin is lazy, it's essentially `itertools.imap` and the old eager `map` has disappeared)