mirror of
https://github.com/python/cpython.git
synced 2025-09-13 04:08:37 +00:00
Changes to always call list.append with a single argument.
This commit is contained in:
parent
b7f48e39c3
commit
2715bb20db
3 changed files with 8 additions and 8 deletions
|
@ -64,11 +64,11 @@ class Para:
|
||||||
for i in range(len(self.words)):
|
for i in range(len(self.words)):
|
||||||
word = self.words[i]
|
word = self.words[i]
|
||||||
if type(word) == Int: continue
|
if type(word) == Int: continue
|
||||||
fo, te, wi, sp, st, as, de = word
|
(fo, te, wi, sp, st, as, de) = word
|
||||||
self.words[i] = fo, te, wi, sp, 0, as, de
|
self.words[i] = (fo, te, wi, sp, 0, as, de)
|
||||||
total = total + wi + sp
|
total = total + wi + sp
|
||||||
if total < tab:
|
if total < tab:
|
||||||
self.words.append(None, '', 0, tab-total, 0, as, de)
|
self.words.append((None, '', 0, tab-total, 0, as, de))
|
||||||
#
|
#
|
||||||
# Make a hanging tag: tab to hang, increment indent_left by hang,
|
# Make a hanging tag: tab to hang, increment indent_left by hang,
|
||||||
# and reset indent_hang to -hang
|
# and reset indent_hang to -hang
|
||||||
|
|
|
@ -64,11 +64,11 @@ class Para:
|
||||||
for i in range(len(self.words)):
|
for i in range(len(self.words)):
|
||||||
word = self.words[i]
|
word = self.words[i]
|
||||||
if type(word) == Int: continue
|
if type(word) == Int: continue
|
||||||
fo, te, wi, sp, st, as, de = word
|
(fo, te, wi, sp, st, as, de) = word
|
||||||
self.words[i] = fo, te, wi, sp, 0, as, de
|
self.words[i] = (fo, te, wi, sp, 0, as, de)
|
||||||
total = total + wi + sp
|
total = total + wi + sp
|
||||||
if total < tab:
|
if total < tab:
|
||||||
self.words.append(None, '', 0, tab-total, 0, as, de)
|
self.words.append((None, '', 0, tab-total, 0, as, de))
|
||||||
#
|
#
|
||||||
# Make a hanging tag: tab to hang, increment indent_left by hang,
|
# Make a hanging tag: tab to hang, increment indent_left by hang,
|
||||||
# and reset indent_hang to -hang
|
# and reset indent_hang to -hang
|
||||||
|
|
|
@ -66,7 +66,7 @@ def extract_tb(tb, limit = None):
|
||||||
line = linecache.getline(filename, lineno)
|
line = linecache.getline(filename, lineno)
|
||||||
if line: line = string.strip(line)
|
if line: line = string.strip(line)
|
||||||
else: line = None
|
else: line = None
|
||||||
list.append(filename, lineno, name, line)
|
list.append((filename, lineno, name, line))
|
||||||
tb = tb.tb_next
|
tb = tb.tb_next
|
||||||
n = n+1
|
n = n+1
|
||||||
return list
|
return list
|
||||||
|
@ -176,7 +176,7 @@ def extract_stack(f=None, limit = None):
|
||||||
line = linecache.getline(filename, lineno)
|
line = linecache.getline(filename, lineno)
|
||||||
if line: line = string.strip(line)
|
if line: line = string.strip(line)
|
||||||
else: line = None
|
else: line = None
|
||||||
list.append(filename, lineno, name, line)
|
list.append((filename, lineno, name, line))
|
||||||
f = f.f_back
|
f = f.f_back
|
||||||
n = n+1
|
n = n+1
|
||||||
list.reverse()
|
list.reverse()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue