[Python-3000] sets in P3K?

Aahz aahz at pythoncraft.com
Wed Apr 26 00:48:03 CEST 2006


On Tue, Apr 25, 2006, Brett Cannon wrote:
>
> I'll toss in my straw; I have no issue losing listcomps and favoring
> ``list(genexp)``.  TOOWTDI since there is not that huge of a "simple
> over complex" savings.  Probably never thought about this since I
> really got into Python when listcomps were introduced so they happen
> to be heavily ingrained into my Python psyche.

There are [at least] two separate issues being discussed here, and I
think that's confusing things.  From my POV, the issue about whether
listcomps per se go away in Python 3.0 is completely separate from the
issue of whether sets get special literal syntax.

My opinion: if we were designing Python from scratch right now, we might
well consider having only set literals and not dict literals.  However,
I don't think we can have both set and dict literals, and I think that
removing dict literals (or list literals) counts as gratuitous breakage.

Losing listcomps won't be a big problem because they can be automatically
fixed and they aren't much loss.
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"Argue for your limitations, and sure enough they're yours."  --Richard Bach


More information about the Python-3000 mailing list