[Python-3000] sets in P3K?
Greg Wilson
gvwilson at cs.utoronto.ca
Tue Apr 25 03:39:35 CEST 2006
> > Guido:
> > 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>).
> Alex:
> I dislike that as much as I dislike [<genexp>] as a shorthand for
> list(<genexp>), but I have no trouble admitting that if we have the
> [...] form, it's consistent to have the {...} one too.
Greg:
So it really does come down to finding an unlikely-to-confuse notation for
the empty set? If people would like to send me suggestions, I can try an
experiment in class (I start teaching a new crop of second-year students
Python in May).
Thanks,
Greg
More information about the Python-3000
mailing list