mirror of
https://github.com/python/cpython.git
synced 2025-09-17 06:06:25 +00:00
Issue #2335: Backport set literals syntax from Python 3.x.
This commit is contained in:
parent
e365613528
commit
ee936a2130
24 changed files with 562 additions and 285 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue