[Python-Dev] zip() and list-comprehension with commas

Skip Montanaro skip@mojam.com (Skip Montanaro)
Wed, 12 Jul 2000 10:11:44 -0500 (CDT)


    Peter> off-topic:
    Peter> I am still thinking about higher order functions in Python:
    Peter> e.g.: map(+ 1, [1, 2, 3]) instead of map(lambda x: x + 1, [1, 2, 3])
    Peter> don't have a clue how to do that yet.

That would be

    [x + 1 for x in [1,2,3]]

of course... ;-)

Skip