summaryrefslogtreecommitdiffstats
path: root/Lib/markupbase.py
diff options
context:
space:
mode:
authorWalter Dörwald <walter@livinglogic.de>2004-02-12 17:35:32 (GMT)
committerWalter Dörwald <walter@livinglogic.de>2004-02-12 17:35:32 (GMT)
commit70a6b49821a3226f55e9716f32d802d06640cb89 (patch)
tree3c8ca10c1fa09e025bd266cf855a00d7d96c55aa /Lib/markupbase.py
parentecfeb7f095dfd9c1c8929bf3df858ee35e0d9e9e (diff)
downloadcpython-70a6b49821a3226f55e9716f32d802d06640cb89.zip
cpython-70a6b49821a3226f55e9716f32d802d06640cb89.tar.gz
cpython-70a6b49821a3226f55e9716f32d802d06640cb89.tar.bz2
Replace backticks with repr() or "%r"
From SF patch #852334.
Diffstat (limited to 'Lib/markupbase.py')
-rw-r--r--Lib/markupbase.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/Lib/markupbase.py b/Lib/markupbase.py
index 62587e0..c1e5acd 100644
--- a/Lib/markupbase.py
+++ b/Lib/markupbase.py
@@ -124,7 +124,7 @@ class ParserBase:
self.error("unexpected '[' char in declaration")
else:
self.error(
- "unexpected %s char in declaration" % `rawdata[j]`)
+ "unexpected %r char in declaration" % rawdata[j])
if j < 0:
return j
return -1 # incomplete
@@ -144,7 +144,7 @@ class ParserBase:
# look for MS Office ]> ending
match= _msmarkedsectionclose.search(rawdata, i+3)
else:
- self.error('unknown status keyword %s in marked section' % `rawdata[i+3:j]`)
+ self.error('unknown status keyword %r in marked section' % rawdata[i+3:j])
if not match:
return -1
if report:
@@ -180,8 +180,7 @@ class ParserBase:
return -1
if s != "<!":
self.updatepos(declstartpos, j + 1)
- self.error("unexpected char in internal subset (in %s)"
- % `s`)
+ self.error("unexpected char in internal subset (in %r)" % s)
if (j + 2) == n:
# end of buffer; incomplete
return -1
@@ -199,7 +198,7 @@ class ParserBase:
if name not in ("attlist", "element", "entity", "notation"):
self.updatepos(declstartpos, j + 2)
self.error(
- "unknown declaration %s in internal subset" % `name`)
+ "unknown declaration %r in internal subset" % name)
# handle the individual names
meth = getattr(self, "_parse_doctype_" + name)
j = meth(j, declstartpos)
@@ -230,7 +229,7 @@ class ParserBase:
j = j + 1
else:
self.updatepos(declstartpos, j)
- self.error("unexpected char %s in internal subset" % `c`)
+ self.error("unexpected char %r in internal subset" % c)
# end of buffer reached
return -1