Mercurial > cpython-lru_cache-weakref
diff Lib/compiler/pycodegen.py @ 58229:c2fdf25329ff legacy-trunk
Issue #2335: Backport set literals syntax from Python 3.x.
| author | Alexandre Vassalotti <alexandre@peadrop.com> |
|---|---|
| date | Sat, 09 Jan 2010 23:35:54 +0000 |
| parents | 442e170b56c3 |
| children | edfed0e32ced |
line wrap: on
line diff
--- a/Lib/compiler/pycodegen.py Sat Jan 09 18:50:50 2010 +0000 +++ b/Lib/compiler/pycodegen.py Sat Jan 09 23:35:54 2010 +0000 @@ -1215,6 +1215,12 @@ self.visit(elt) self.emit('BUILD_LIST', len(node.nodes)) + def visitSet(self, node): + self.set_lineno(node) + for elt in node.nodes: + self.visit(elt) + self.emit('BUILD_SET', len(node.nodes)) + def visitSliceobj(self, node): for child in node.nodes: self.visit(child)
