diff options
Diffstat (limited to 'Lib/markupbase.py')
-rw-r--r-- | Lib/markupbase.py | 11 |
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 |