Mercurial > cpython-lru_cache-weakref
diff Python/compile.c @ 39693:d0b83c4630c0
SF patch 1547796 by Georg Brandl -- set literals.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Mon, 28 Aug 2006 15:27:34 +0000 |
| parents | eb2f70fdbf32 |
| children | c94f37054f19 |
line wrap: on
line diff
--- a/Python/compile.c Sun Aug 27 01:03:34 2006 +0000 +++ b/Python/compile.c Mon Aug 28 15:27:34 2006 +0000 @@ -851,6 +851,7 @@ return 1; case BUILD_TUPLE: case BUILD_LIST: + case BUILD_SET: return 1-oparg; case BUILD_MAP: return 1; @@ -2955,6 +2956,11 @@ ADDOP(c, STORE_SUBSCR); } break; + case Set_kind: + n = asdl_seq_LEN(e->v.Set.elts); + VISIT_SEQ(c, expr, e->v.Set.elts); + ADDOP_I(c, BUILD_SET, n); + break; case ListComp_kind: return compiler_listcomp(c, e); case GeneratorExp_kind:
