[Python-3000] sets in P3K?

Steven Bethard steven.bethard at gmail.com
Mon Apr 24 23:43:40 CEST 2006


Guido van Rossum wrote:
> OTOH mathematicians (whether in high school or not) write things like
> {x | 2 < x < 10}, which is of course the origin of our list
> comprehensions and generator expressions. Therefor I think it makes
> sense that {F(x) for x in S if P(x)}, ough to be valid syntax if we
> support {1, 2, 3} -- IOW the form {<genexp>} should mean the same as
> set(<genexp>).

So then we'd have list comprehensions and set comprehensions, but no
dict-comprehensions?  Or was the intention to introduce one of the
previously rejected dict-comprehension syntaxes?

STeVe
--
Grammar am for people who can't think for myself.
        --- Bucky Katt, Get Fuzzy


More information about the Python-3000 mailing list