summaryrefslogtreecommitdiff
path: root/Lib/calendar.py
diff options
context:
space:
mode:
authorWalter Dörwald <walter@livinglogic.de>2004-02-12 17:35:32 +0000
committerWalter Dörwald <walter@livinglogic.de>2004-02-12 17:35:32 +0000
commit582176023213a5bdaf76a19977f7bb6d508694e9 (patch)
treea5f480092a35a71571f1d24bcd10255e1b93e904 /Lib/calendar.py
parentcdef0ac4f0dc828ee205ffa2999592f5fa6f70d3 (diff)
downloadcpython-582176023213a5bdaf76a19977f7bb6d508694e9.tar.gz
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 fb56826f6f..321059d055 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):