Issue #28255: calendar.TextCalendar.prweek() no longer prints a space after
a weeks's calendar. calendar.TextCalendar.pryear() no longer prints redundant
newline after a year's calendar. Based on patch by Xiang Zhang.
diff --git a/Lib/calendar.py b/Lib/calendar.py
index 07594f3..28ac56f 100644
--- a/Lib/calendar.py
+++ b/Lib/calendar.py
@@ -267,7 +267,7 @@
"""
Print a single week (no newline).
"""
- print(self.formatweek(theweek, width), end=' ')
+ print(self.formatweek(theweek, width), end='')
def formatday(self, day, weekday, width):
"""
@@ -371,7 +371,7 @@
def pryear(self, theyear, w=0, l=0, c=6, m=3):
"""Print a year's calendar."""
- print(self.formatyear(theyear, w, l, c, m))
+ print(self.formatyear(theyear, w, l, c, m), end='')
class HTMLCalendar(Calendar):