]> granicus.if.org Git - python/commitdiff
Fix multi-arg list.append() calls.
authorGuido van Rossum <guido@python.org>
Thu, 8 Oct 1998 15:24:48 +0000 (15:24 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 8 Oct 1998 15:24:48 +0000 (15:24 +0000)
14 files changed:
Demo/ibrowse/ifile.py
Demo/ibrowse/itags.py
Demo/rpc/nfsclient.py
Demo/sgi/gl/mclock.py
Demo/sgi/video/VFile.py
Demo/stdwin/ibrowse/ibrowse.py
Demo/stdwin/ibrowse/ifile.py
Demo/stdwin/ibrowse/itags.py
Demo/stdwin/wdiff.py
Demo/tkinter/guido/AttrDialog.py
Demo/tkinter/www/Para.py
Tools/scripts/eptags.py
Tools/scripts/ifdef.py
Tools/scripts/texi2html.py

index b8d59eed8a793389160220c8e8b228b98e61407b..7e66fcdf00afa077bbb525e8b8db5cb63cb9b870 100755 (executable)
@@ -126,7 +126,7 @@ def analyze_node(text):
                        topic, ref = text[a1:b1], text[a2:b2]
                        if ref == ':':
                                ref = topic
-                       menu.append(topic, ref)
+                       menu.append((topic, ref))
        #
        # Get the footnotes
        #
@@ -140,7 +140,7 @@ def analyze_node(text):
                topic, ref = text[a1:b1], text[a2:b2]
                if ref == ':':
                        ref = topic
-               footnotes.append(topic, ref)
+               footnotes.append((topic, ref))
        #
        return node, (prev, next, up), menu, footnotes
 #
index f30f3fd5a12c0b42dd6f3f200b6fadbd7a665eee..7cddcfa14913613ab820b54d30eafde0855f0663 100755 (executable)
@@ -94,7 +94,7 @@ def parse_indirlist(buf):
                (a,b), (a1,b1), (a2,b2) = match
                file = buf[a1:b1]
                offset = eval(buf[a2:b2]) # XXX What if this gets overflow?
-               list.append(file, offset)
+               list.append((file, offset))
                i = b
        return list
 
index 1bd5d0d45f65f17c6f1e6d82b31c7f2b30cb95da..37ec46c047f9ebfcc4cd9778f8a38dce4e90716b 100644 (file)
@@ -168,7 +168,7 @@ class NFSClient(UDPClient):
                        entries, eof = rest
                        last_cookie = None
                        for fileid, name, cookie in entries:
-                               list.append(fileid, name)
+                               list.append((fileid, name))
                                last_cookie = cookie
                        if eof or last_cookie == None:
                                break
index b1dfa1b0f170dcbbd2a1a5845620d7fc11433b01..6af01ba991ba63c21d28fdd4781aa52773605364 100755 (executable)
@@ -348,7 +348,7 @@ def makesublist(first, icolor):
        for i in range(Gl.nparts):
                angle = (a + i*alpha + FULLC) % FULLC
                value = 255*(Gl.nparts-1-i)/(Gl.nparts-1)
-               list.append(angle, icolor, value)
+               list.append((angle, icolor, value))
        list.sort()
        a, icolor, value = list[0]
        if a <> 0:
@@ -416,7 +416,7 @@ def render(list, (little_hand, big_hand, seconds_hand)):
                Gl.c3i((255, 255, 255)) # White
                circf(0.0, 0.0, 1.0)
        else:
-               list.append(3600, 0, 255) # Sentinel
+               list.append((3600, 0, 255)) # Sentinel
        #
        rgb = [255, 255, 255]
        a_prev = 0
index d6c9fc46621afa97622e90235aeb33b010a961fc..f588f4bb929689bae6c7a660e6f016c658a2a343 100755 (executable)
@@ -590,7 +590,7 @@ class Displayer(VideoParams):
                                                r, g, b = int(rv*255.0), \
                                                          int(gv*255.0), \
                                                          int(bv*255.0)
-                                               map.append(index, r, g, b)
+                                               map.append((index, r, g, b))
                                                if self.color0 == None:
                                                        self.color0 = \
                                                                index, r, g, b
@@ -1034,7 +1034,7 @@ class RandomVinFile(BasicVinFile):
                rv = BasicVinFile.getnextframeheader(self)
                if self.canseek:
                        pos = self.fp.tell()
-                       self.index.append(rv, pos)
+                       self.index.append((rv, pos))
                return rv
 
        def getrandomframe(self, i):
index 41574adba70b3dbddeda69e73eade091b394654a..eec5eb75a607475b02019e10f1a5b3f000a78cae 100755 (executable)
@@ -489,7 +489,7 @@ def imove(win, ref):
        #
        if win.file and win.node:
                lastnode = '(' + win.file + ')' + win.node
-               win.last.append(lastnode, win.textobj.getfocus())
+               win.last.append((lastnode, win.textobj.getfocus()))
        win.file = file
        win.node = node
        win.header = header
index 1ea880ea27ce69bb2e27344e7ac9b1ae4ac11798..94471647adc90aa18b585a982e04e4eeeb011302 100755 (executable)
@@ -126,7 +126,7 @@ def analyze_node(text):
                        topic, ref = text[a1:b1], text[a2:b2]
                        if ref == ':':
                                ref = topic
-                       menu.append(topic, ref)
+                       menu.append((topic, ref))
        #
        # Get the footnotes
        #
@@ -140,7 +140,7 @@ def analyze_node(text):
                topic, ref = text[a1:b1], text[a2:b2]
                if ref == ':':
                        ref = topic
-               footnotes.append(topic, ref)
+               footnotes.append((topic, ref))
        #
        return node, (prev, next, up), menu, footnotes
 #
index f30f3fd5a12c0b42dd6f3f200b6fadbd7a665eee..7cddcfa14913613ab820b54d30eafde0855f0663 100755 (executable)
@@ -94,7 +94,7 @@ def parse_indirlist(buf):
                (a,b), (a1,b1), (a2,b2) = match
                file = buf[a1:b1]
                offset = eval(buf[a2:b2]) # XXX What if this gets overflow?
-               list.append(file, offset)
+               list.append((file, offset))
                i = b
        return list
 
index b8c8da37315519385fe9cbe78340853564693e61..50ca0325d9670854fc52243eada1ac2c7bab2194 100755 (executable)
@@ -95,7 +95,7 @@ def diffdata(a, b, flags): # Compute directory differences.
                if x in ['./', '../']:
                        pass
                elif x not in b_list:
-                       a_only.append(x, a_only_action)
+                       a_only.append((x, a_only_action))
                else:
                        ax = os.path.join(a, x)
                        bx = os.path.join(b, x)
@@ -110,15 +110,15 @@ def diffdata(a, b, flags): # Compute directory differences.
                                except (RuntimeError, os.error):
                                        same = 0
                        if same:
-                               ab_same.append(x, ab_same_action)
+                               ab_same.append((x, ab_same_action))
                        else:
-                               ab_diff.append(x, ab_diff_action)
+                               ab_diff.append((x, ab_diff_action))
        #
        for x in b_list:
                if x in ['./', '../']:
                        pass
                elif x not in a_list:
-                       b_only.append(x, b_only_action)
+                       b_only.append((x, b_only_action))
        #
        return data
 
index 32b4b7e850eec8f3271ec04e7c774cb1f4be10f8..4878cb51976309622d952782b351a18426ab45cc 100755 (executable)
@@ -113,7 +113,7 @@ class Dialog:
                self.choices = {}
                list = []
                for k, dc in self.options.items():
-                       list.append(k, dc)
+                       list.append((k, dc))
                list.sort()
                for k, (d, c) in list:
                        try:
index 6a7057ddbfd5aa9662b353718026852fbbffa6d3..e24471f0906f2cb4cc808915a8e8b5cb2d0479d2 100755 (executable)
@@ -67,7 +67,7 @@ class Para:
                        self.words[i] = fo, te, wi, sp, 0, as, de
                        total = total + wi + sp
                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,
        # and reset indent_hang to -hang
index 86b6ee17c417775eacd540e612153f812d82bc29..58021b4a5aa6fe722ff1635145f2c4b2339bfd46 100755 (executable)
@@ -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')
index ff64425c9a776666d3afdaa7cac2c9c8c98719c7..939bea9afa500ca9682083a4e76da4fdd5c4c647 100755 (executable)
@@ -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]
index 19cbe2738d64b856ee547398dd379a30411de2a8..8c747aa0a2b8c4f175460fa8998f91f58c68ba96 100755 (executable)
@@ -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')