diff options
author | Alexandre Vassalotti <alexandre@peadrop.com> | 2010-01-09 23:35:54 +0000 |
---|---|---|
committer | Alexandre Vassalotti <alexandre@peadrop.com> | 2010-01-09 23:35:54 +0000 |
commit | ee936a21308679654b2d458166ff094ed735fef7 (patch) | |
tree | 612cd109e8ede4080f58f30ece3212d8e0f996d2 /Lib/compiler/pycodegen.py | |
parent | e36561352895170f28f77f0b4ec4292e35d1cc01 (diff) | |
download | cpython-git-ee936a21308679654b2d458166ff094ed735fef7.tar.gz |
Issue #2335: Backport set literals syntax from Python 3.x.
Diffstat (limited to 'Lib/compiler/pycodegen.py')
-rw-r--r-- | Lib/compiler/pycodegen.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/compiler/pycodegen.py b/Lib/compiler/pycodegen.py index 960c4fce29..bef9c70f0f 100644 --- a/Lib/compiler/pycodegen.py +++ b/Lib/compiler/pycodegen.py @@ -1215,6 +1215,12 @@ class CodeGenerator: 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) |