This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: set literals
Type: Stage:
Components: Interpreter Core Versions: Python 3.0
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: gvanrossum Nosy List: georg.brandl, gvanrossum
Priority: normal Keywords: patch

Created on 2006-08-28 10:20 by georg.brandl, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
set-literals.diff georg.brandl, 2006-08-28 10:20 #1
Messages (3)
msg50997 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2006-08-28 10:20
A rough patch implementing {1, 2, 3}-style set literals.
There is no empty set literal.
msg50998 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2006-08-28 15:27
Logged In: YES 
user_id=6380

Committed revision 51631.


despite two (related?) flaws:

(1)
../Python/symtable.c: In function `symtable_visit_expr':
../Python/symtable.c:1209: warning: enumeration value
`Set_kind' not handled in switch

(2)
>>> {(x for x in range(10))}
KeyError: 'unknown symbol table entry'
>>> 

(Don't ask me why that was the third thing I tried with the
new syntax. :-)

Also, I'd love set comprehensions!
msg50999 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2006-08-28 16:39
Logged In: YES 
user_id=849994

Okay, fixed the symtable issue.

Hopefully other people also do weird things with the new
syntax, the unit tests aren't very thorough (yet).
History
Date User Action Args
2022-04-11 14:56:19adminsetgithub: 43901
2008-01-06 22:29:46adminsetkeywords: - py3k
versions: + Python 3.0
2006-08-28 10:20:21georg.brandlcreate