[Python-3000] Set literals (original) (raw)

Georg Brandl g.brandl at gmx.net
Mon Aug 28 19:44:52 CEST 2006


Guido van Rossum wrote:

On 8/28/06, Georg Brandl <g.brandl at gmx.net> wrote:

At python.org/sf/1547796, there is a preliminary patch for Py3k set literals as specified in PEP 3100. Very cool! This is now checked in.

Wow, that's fast...

Georg, can you do something about repr() of an empty set? This currently produces "{}" while it should produce "set()".

Right, forgot about that case. I'll correct that now. (Grr, I even mindlessly changed the unittest that would have caught it)

In the meantime, I played around with the peepholer and tried to copy the "for x in tuple_or_list" optimization for sets. Results are in SF patch #1548082.

Set comprehensions are not implemented. ETA?

There are some points I'd like to have clarified first:

Georg



More information about the Python-3000 mailing list