mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
* Remove PRINT_ITEM(_TO), PRINT_NEWLINE(_TO) opcodes.
* Fix some docstrings and one Print -> print. * Fix test_{class,code,descrtut,dis,extcall,parser,popen,pkg,subprocess,syntax,traceback}. These were the ones that generated code with a print statement. In most remaining failing tests there's an issue with the soft space.
This commit is contained in:
parent
08c47ba0df
commit
88fc6646d1
31 changed files with 159 additions and 553 deletions
|
@ -998,50 +998,6 @@ class Power(Node):
|
|||
def __repr__(self):
|
||||
return "Power((%s, %s))" % (repr(self.left), repr(self.right))
|
||||
|
||||
class Print(Node):
|
||||
def __init__(self, nodes, dest, lineno=None):
|
||||
self.nodes = nodes
|
||||
self.dest = dest
|
||||
self.lineno = lineno
|
||||
|
||||
def getChildren(self):
|
||||
children = []
|
||||
children.extend(flatten(self.nodes))
|
||||
children.append(self.dest)
|
||||
return tuple(children)
|
||||
|
||||
def getChildNodes(self):
|
||||
nodelist = []
|
||||
nodelist.extend(flatten_nodes(self.nodes))
|
||||
if self.dest is not None:
|
||||
nodelist.append(self.dest)
|
||||
return tuple(nodelist)
|
||||
|
||||
def __repr__(self):
|
||||
return "Print(%s, %s)" % (repr(self.nodes), repr(self.dest))
|
||||
|
||||
class Printnl(Node):
|
||||
def __init__(self, nodes, dest, lineno=None):
|
||||
self.nodes = nodes
|
||||
self.dest = dest
|
||||
self.lineno = lineno
|
||||
|
||||
def getChildren(self):
|
||||
children = []
|
||||
children.extend(flatten(self.nodes))
|
||||
children.append(self.dest)
|
||||
return tuple(children)
|
||||
|
||||
def getChildNodes(self):
|
||||
nodelist = []
|
||||
nodelist.extend(flatten_nodes(self.nodes))
|
||||
if self.dest is not None:
|
||||
nodelist.append(self.dest)
|
||||
return tuple(nodelist)
|
||||
|
||||
def __repr__(self):
|
||||
return "Printnl(%s, %s)" % (repr(self.nodes), repr(self.dest))
|
||||
|
||||
class Raise(Node):
|
||||
def __init__(self, expr1, expr2, expr3, lineno=None):
|
||||
self.expr1 = expr1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue