mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
Fix multi-arg list.append() calls.
This commit is contained in:
parent
215193bd93
commit
9c2c1e88a3
14 changed files with 27 additions and 27 deletions
|
|
@ -40,7 +40,7 @@ def treat_file(file, outfp):
|
|||
name = line[a2:b2]
|
||||
pat = line[a:b]
|
||||
tag = pat + '\177' + `lineno` + ',' + `charno` + '\n'
|
||||
tags.append(name, tag)
|
||||
tags.append((name, tag))
|
||||
size = size + len(tag)
|
||||
charno = charno + len(line)
|
||||
outfp.write('\f\n' + file + ',' + `size` + '\n')
|
||||
|
|
|
|||
|
|
@ -79,16 +79,16 @@ def process(fpi, fpo):
|
|||
ko = 0
|
||||
word = words[1]
|
||||
if word in defs:
|
||||
stack.append(ok, ko, word)
|
||||
stack.append((ok, ko, word))
|
||||
if not ko: ok = 0
|
||||
elif word in undefs:
|
||||
stack.append(ok, not ko, word)
|
||||
stack.append((ok, not ko, word))
|
||||
if ko: ok = 0
|
||||
else:
|
||||
stack.append(ok, -1, word)
|
||||
stack.append((ok, -1, word))
|
||||
if ok: fpo.write(line)
|
||||
elif keyword == 'if':
|
||||
stack.append(ok, -1, '')
|
||||
stack.append((ok, -1, ''))
|
||||
if ok: fpo.write(line)
|
||||
elif keyword == 'else' and stack:
|
||||
s_ok, s_ko, s_word = stack[-1]
|
||||
|
|
|
|||
|
|
@ -644,7 +644,7 @@ class TexinfoParser:
|
|||
|
||||
def close_footnote(self):
|
||||
id = len(self.footnotes) + 1
|
||||
self.footnotes.append(id, self.collectsavings())
|
||||
self.footnotes.append((id, self.collectsavings()))
|
||||
|
||||
def writefootnotes(self):
|
||||
self.write(self.FN_HEADER)
|
||||
|
|
@ -993,7 +993,7 @@ class TexinfoParser:
|
|||
for i in self.numbering:
|
||||
x = x + `i` + '.'
|
||||
args = x + ' ' + args
|
||||
self.contents.append(level, args, self.nodename)
|
||||
self.contents.append((level, args, self.nodename))
|
||||
self.write('<', type, '>')
|
||||
self.expand(args)
|
||||
self.write('</', type, '>\n')
|
||||
|
|
@ -1362,7 +1362,7 @@ class TexinfoParser:
|
|||
def do_vindex(self, args): self.index('vr', args)
|
||||
|
||||
def index(self, name, args):
|
||||
self.whichindex[name].append(args, self.nodename)
|
||||
self.whichindex[name].append((args, self.nodename))
|
||||
|
||||
def do_synindex(self, args):
|
||||
words = string.split(args)
|
||||
|
|
@ -1409,7 +1409,7 @@ class TexinfoParser:
|
|||
break
|
||||
i = mo.end()
|
||||
sortkey = sortkey[i:]
|
||||
index1.append(sortkey, key, node)
|
||||
index1.append((sortkey, key, node))
|
||||
del index[:]
|
||||
index1.sort()
|
||||
self.write('<DL COMPACT>\n')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue