summaryrefslogtreecommitdiffstats
path: root/Lib/calendar.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/calendar.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/calendar.py')
-rw-r--r--Lib/calendar.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/calendar.py b/Lib/calendar.py
index fb56826..321059d 100644
--- a/Lib/calendar.py
+++ b/Lib/calendar.py
@@ -151,9 +151,9 @@ def month(theyear, themonth, w=0, l=0):
"""Return a month's calendar string (multi-line)."""
w = max(2, w)
l = max(1, l)
- s = ((month_name[themonth] + ' ' + `theyear`).center(
- 7 * (w + 1) - 1).rstrip() +
- '\n' * l + weekheader(w).rstrip() + '\n' * l)
+ s = ("%s %r" % (month_name[themonth], theyear)).center(
+ 7 * (w + 1) - 1).rstrip() + \
+ '\n' * l + weekheader(w).rstrip() + '\n' * l
for aweek in monthcalendar(theyear, themonth):
s = s + week(aweek, w).rstrip() + '\n' * l
return s[:-l] + '\n'
@@ -181,7 +181,7 @@ def calendar(year, w=0, l=0, c=_spacing):
l = max(1, l)
c = max(2, c)
colwidth = (w + 1) * 7 - 1
- s = `year`.center(colwidth * 3 + c * 2).rstrip() + '\n' * l
+ s = repr(year).center(colwidth * 3 + c * 2).rstrip() + '\n' * l
header = weekheader(w)
header = format3cstring(header, header, header, colwidth, c).rstrip()
for q in range(January, January+12, 3):