mirror of https://github.com/python/cpython.git
Be a lot less verbose by default.
This commit is contained in:
parent
20417bcd18
commit
11845e00b2
|
@ -5,6 +5,7 @@
|
|||
|
||||
Error = "bgenGenerator.Error"
|
||||
|
||||
DEBUG=0
|
||||
|
||||
# Strings to specify argument transfer modes in generator calls
|
||||
IN = "in"
|
||||
|
@ -15,7 +16,7 @@
|
|||
class BaseFunctionGenerator:
|
||||
|
||||
def __init__(self, name, condition=None):
|
||||
print "<--", name
|
||||
if DEBUG: print "<--", name
|
||||
self.name = name
|
||||
self.prefix = name
|
||||
self.objecttype = "PyObject" # Type of _self argument to function
|
||||
|
@ -25,7 +26,7 @@ def setprefix(self, prefix):
|
|||
self.prefix = prefix
|
||||
|
||||
def generate(self):
|
||||
print "-->", self.name
|
||||
if DEBUG: print "-->", self.name
|
||||
if self.condition:
|
||||
Output()
|
||||
Output(self.condition)
|
||||
|
|
|
@ -67,7 +67,7 @@ def reportusedtypes(self):
|
|||
for type in types:
|
||||
modes = self.usedtypes[type].keys()
|
||||
modes.sort()
|
||||
print type, string.join(modes)
|
||||
self.report("%s %s", type, string.join(modes))
|
||||
|
||||
def gentypetest(self, file):
|
||||
fp = open(file, "w")
|
||||
|
@ -89,7 +89,7 @@ def gentypetest(self, file):
|
|||
fp.close()
|
||||
|
||||
def initsilent(self):
|
||||
self.silent = 0
|
||||
self.silent = 1
|
||||
|
||||
def error(self, format, *args):
|
||||
if self.silent >= 0:
|
||||
|
@ -486,7 +486,7 @@ def processrawspec(self, raw):
|
|||
return
|
||||
self.report("==> %s %s <==", type, name)
|
||||
if self.blacklisted(type, name):
|
||||
self.error("*** %s %s blacklisted", type, name)
|
||||
self.report("*** %s %s blacklisted", type, name)
|
||||
return
|
||||
returnlist = [(type, name, 'ReturnMode')]
|
||||
returnlist = self.repairarglist(name, returnlist)
|
||||
|
@ -496,7 +496,7 @@ def processrawspec(self, raw):
|
|||
if self.unmanageable(type, name, arglist):
|
||||
##for arg in arglist:
|
||||
## self.report(" %s", `arg`)
|
||||
self.error("*** %s %s unmanageable", type, name)
|
||||
self.report("*** %s %s unmanageable", type, name)
|
||||
return
|
||||
self.alreadydone.append(name)
|
||||
self.generate(type, name, arglist)
|
||||
|
|
Loading…
Reference in New Issue