[Python-Dev] accumulator display syntax

Skip Montanaro skip at pobox.com
Wed Oct 22 08:48:52 EDT 2003


    Neil> Another nice thing is that we have tuple and dict comprehensions
    Neil> for free:

    Neil>   tuple(x for x in S)
    Neil>   dict((k, v) for k, v in S)
    Neil>   Set(x for x in S)

    Neil> Aside from the bit of syntactic sugar, everything is nice an
    Neil> regular.

Maybe in 3.0 the syntactic sugar for list comprehensions should disappear
then.

Skip



More information about the Python-Dev mailing list