[Python-checkins] python/dist/src/Doc/tools/sgmlconv esistools.py,
1.9, 1.10 latex2esis.py, 1.31, 1.32
doerwalter at users.sourceforge.net
doerwalter at users.sourceforge.net
Thu Feb 12 12:35:38 EST 2004
Update of /cvsroot/python/python/dist/src/Doc/tools/sgmlconv
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21620/Doc/tools/sgmlconv
Modified Files:
esistools.py latex2esis.py
Log Message:
Replace backticks with repr() or "%r"
>From SF patch #852334.
Index: esistools.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/tools/sgmlconv/esistools.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** esistools.py 16 Oct 2002 16:02:08 -0000 1.9
--- esistools.py 12 Feb 2004 17:35:05 -0000 1.10
***************
*** 30,34 ****
r = r + unichr(int(n))
else:
! raise ValueError, "can't handle " + `s`
return r
--- 30,34 ----
r = r + unichr(int(n))
else:
! raise ValueError, "can't handle %r" % s
return r
***************
*** 221,226 ****
else:
! raise xml.sax.SAXNotRecognizedException("unknown property %s"
! % `property`)
def setProperty(self, property, value):
--- 221,226 ----
else:
! raise xml.sax.SAXNotRecognizedException("unknown property %r"
! % (property, ))
def setProperty(self, property, value):
Index: latex2esis.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/tools/sgmlconv/latex2esis.py,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** latex2esis.py 16 Oct 2002 16:00:42 -0000 1.31
--- latex2esis.py 12 Feb 2004 17:35:05 -0000 1.32
***************
*** 74,79 ****
def append(self, entry):
if not isinstance(entry, str):
! raise LaTeXFormatError("cannot push non-string on stack: "
! + `entry`)
#dbgmsg("%s<%s>" % (" "*len(self.data), entry))
list.append(self, entry)
--- 74,79 ----
def append(self, entry):
if not isinstance(entry, str):
! raise LaTeXFormatError("cannot push non-string on stack: %r"
! % (entry, ))
#dbgmsg("%s<%s>" % (" "*len(self.data), entry))
list.append(self, entry)
***************
*** 209,214 ****
if not m:
raise LaTeXFormatError(
! "could not extract parameter %s for %s: %s"
! % (pentry.name, macroname, `line[:100]`))
if entry.outputname:
self.dump_attr(pentry, m.group(1))
--- 209,214 ----
if not m:
raise LaTeXFormatError(
! "could not extract parameter %s for %s: %r"
! % (pentry.name, macroname, line[:100]))
if entry.outputname:
self.dump_attr(pentry, m.group(1))
***************
*** 260,264 ****
stack.append(entry.name)
self.write("(%s\n" % entry.outputname)
! #dbgmsg("--- text: %s" % `pentry.text`)
self.write("-%s\n" % encode(pentry.text))
elif pentry.type == "entityref":
--- 260,264 ----
stack.append(entry.name)
self.write("(%s\n" % entry.outputname)
! #dbgmsg("--- text: %r" % pentry.text)
self.write("-%s\n" % encode(pentry.text))
elif pentry.type == "entityref":
***************
*** 327,332 ****
if len(line) > 100:
extra = "..."
! raise LaTeXFormatError("could not identify markup: %s%s"
! % (`line[:100]`, extra))
while stack:
entry = self.get_entry(stack[-1])
--- 327,332 ----
if len(line) > 100:
extra = "..."
! raise LaTeXFormatError("could not identify markup: %r%s"
! % (line[:100], extra))
while stack:
entry = self.get_entry(stack[-1])
***************
*** 362,366 ****
entry = self.table.get(name)
if entry is None:
! dbgmsg("get_entry(%s) failing; building default entry!" % `name`)
# not defined; build a default entry:
entry = TableEntry(name)
--- 362,366 ----
entry = self.table.get(name)
if entry is None:
! dbgmsg("get_entry(%r) failing; building default entry!" % (name, ))
# not defined; build a default entry:
entry = TableEntry(name)
***************
*** 487,491 ****
name = self.__current.name
if self.__table.has_key(name):
! raise ValueError("name %s already in use" % `name`)
self.__table[name] = self.__current
self.__current = None
--- 487,491 ----
name = self.__current.name
if self.__table.has_key(name):
! raise ValueError("name %r already in use" % (name,))
self.__table[name] = self.__current
self.__current = None
More information about the Python-checkins
mailing list