[Python-3000] sets in P3K?

Steven Bethard steven.bethard at gmail.com
Thu Apr 27 20:57:30 CEST 2006


On 4/27/06, Raymond Hettinger <rhettinger at ewtllc.com> wrote:
> [pep-3100 checkin]
> >  {F(x) for x in S if P(x)} means set(F(x) for x in S if P(x)).
>
> I presume this means that there will never be dictionary
> comprehensions (as they would aspire to have an identical
> notation).

Why would that be necessary?  Wouldn't
    {F(x):G(x) for x in S if P(x)}
be unambiguous?  (Not that I'm pushing for dict comprehensions -- I
just don't see how if Guido wants both dict and set comprehensions, he
couldn't have them.)

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


More information about the Python-3000 mailing list