2to3 --fix=repr
diff --git a/Lib/fontTools/afmLib.py b/Lib/fontTools/afmLib.py
index 04277d1..0eafbb3 100644
--- a/Lib/fontTools/afmLib.py
+++ b/Lib/fontTools/afmLib.py
@@ -116,7 +116,7 @@
continue
m = identifierRE.match(line)
if m is None:
- raise error("syntax error in AFM file: " + `line`)
+ raise error("syntax error in AFM file: " + repr(line))
pos = m.regs[1][1]
word = line[:pos]
@@ -135,7 +135,7 @@
def parsechar(self, rest):
m = charRE.match(rest)
if m is None:
- raise error("syntax error in AFM file: " + `rest`)
+ raise error("syntax error in AFM file: " + repr(rest))
things = []
for fr, to in m.regs[1:]:
things.append(rest[fr:to])
@@ -147,7 +147,7 @@
def parsekernpair(self, rest):
m = kernRE.match(rest)
if m is None:
- raise error("syntax error in AFM file: " + `rest`)
+ raise error("syntax error in AFM file: " + repr(rest))
things = []
for fr, to in m.regs[1:]:
things.append(rest[fr:to])
@@ -172,7 +172,7 @@
def parsecomposite(self, rest):
m = compositeRE.match(rest)
if m is None:
- raise error("syntax error in AFM file: " + `rest`)
+ raise error("syntax error in AFM file: " + repr(rest))
charname = m.group(1)
ncomponents = int(m.group(2))
rest = rest[m.regs[0][1]:]
@@ -180,7 +180,7 @@
while 1:
m = componentRE.match(rest)
if m is None:
- raise error("syntax error in AFM file: " + `rest`)
+ raise error("syntax error in AFM file: " + repr(rest))
basechar = m.group(1)
xoffset = int(m.group(2))
yoffset = int(m.group(3))
@@ -223,7 +223,7 @@
lines.append(attr + " " + str(value))
# write char metrics
- lines.append("StartCharMetrics " + `len(self._chars)`)
+ lines.append("StartCharMetrics " + repr(len(self._chars)))
items = map(lambda (charname, (charnum, width, box)):
(charnum, (charname, width, box)),
self._chars.items())
@@ -245,7 +245,7 @@
# write kerning info
lines.append("StartKernData")
- lines.append("StartKernPairs " + `len(self._kerning)`)
+ lines.append("StartKernPairs " + repr(len(self._kerning)))
items = self._kerning.items()
items.sort() # XXX is order important?
for (leftchar, rightchar), value in items: