diff options
author | Walter Dörwald <walter@livinglogic.de> | 2004-02-12 17:35:32 (GMT) |
---|---|---|
committer | Walter Dörwald <walter@livinglogic.de> | 2004-02-12 17:35:32 (GMT) |
commit | 70a6b49821a3226f55e9716f32d802d06640cb89 (patch) | |
tree | 3c8ca10c1fa09e025bd266cf855a00d7d96c55aa /Tools/modulator/modulator.py | |
parent | ecfeb7f095dfd9c1c8929bf3df858ee35e0d9e9e (diff) | |
download | cpython-70a6b49821a3226f55e9716f32d802d06640cb89.zip cpython-70a6b49821a3226f55e9716f32d802d06640cb89.tar.gz cpython-70a6b49821a3226f55e9716f32d802d06640cb89.tar.bz2 |
Replace backticks with repr() or "%r"
From SF patch #852334.
Diffstat (limited to 'Tools/modulator/modulator.py')
-rwxr-xr-x | Tools/modulator/modulator.py | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/Tools/modulator/modulator.py b/Tools/modulator/modulator.py index df6d9ef..4828743 100755 --- a/Tools/modulator/modulator.py +++ b/Tools/modulator/modulator.py @@ -216,15 +216,15 @@ class UI_module: o.synchronize() onames = [] for i in range(len(objects)): - oname = 'o'+`i+1` + oname = 'o%d' % (i+1) rv = rv + objects[i].gencode(oname) onames.append(oname) - rv = rv + (name+' = genmodule.module()\n') - rv = rv + (name+'.name = '+`self.name_entry.get()`+'\n') - rv = rv + (name+'.abbrev = '+`self.abbrev_entry.get()`+'\n') - rv = rv + (name+'.methodlist = '+`getlistlist(self.method_list)`+'\n') - rv = rv + (name+'.objects = ['+','.join(onames)+']\n') - rv = rv + ('\n') + rv = rv + '%s = genmodule.module()\n' % (name,) + rv = rv + '%s.name = %r\n' % (name, self.name_entry.get()) + rv = rv + '%s.abbrev = %r\n' % (name, self.abbrev_entry.get()) + rv = rv + '%s.methodlist = %r\n' % (name, getlistlist(self.method_list)) + rv = rv + '%s.objects = [%s]\n' % (name, ','.join(onames)) + rv = rv + '\n' return rv object_number = 0 @@ -235,7 +235,7 @@ class UI_object: object_number = object_number + 1 self.num = object_number - self.vpref = 'o'+`self.num`+'_' + self.vpref = 'o%r_' % self.num self.frame = Toplevel(parent.objframe) # self.frame.pack() self.frame.title('Modulator: object view') @@ -340,16 +340,16 @@ class UI_object: def gencode(self, name): rv = '' - rv = rv + (name+' = genmodule.object()\n') - rv = rv + (name+'.name = '+`self.name_entry.get()`+'\n') - rv = rv + (name+'.abbrev = '+`self.abbrev_entry.get()`+'\n') - rv = rv + (name+'.methodlist = '+`getlistlist(self.method_list)`+'\n') + rv = rv + '%s = genmodule.object()\n' % (name,) + rv = rv + '%s.name = %r\n' % (name, self.name_entry.get()) + rv = rv + '%s.abbrev = %r\n' % (name, self.abbrev_entry.get()) + rv = rv + '%s.methodlist = %r\n' % (name, getlistlist(self.method_list)) fl = [] for fn in genmodule.FUNCLIST: vname = self.vpref + fn if self.f5.getvar(vname) == '1': fl.append(fn) - rv = rv + (name+'.funclist = '+`fl`+'\n') + rv = rv + '%s.funclist = %r\n' % (name, fl) fl = [] for fn in genmodule.TYPELIST: @@ -357,9 +357,9 @@ class UI_object: if self.f5.getvar(vname) == '1': fl.append(fn) - rv = rv + (name+'.typelist = '+`fl`+'\n') + rv = rv + '%s.typelist = %r\n' % (name, fl) - rv = rv + ('\n') + rv = rv + '\n' return rv |