From: Walter Dörwald Date: Mon, 3 Apr 2006 15:21:59 +0000 (+0000) Subject: Always return firstweekday % 7 instead of complaining X-Git-Tag: v2.5a1~46 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=72d84af401727711170a605ae5c82596f514f84e;p=thirdparty%2FPython%2Fcpython.git Always return firstweekday % 7 instead of complaining on setting. --- diff --git a/Lib/calendar.py b/Lib/calendar.py index 2b974bfa421e..4965773c73c1 100644 --- a/Lib/calendar.py +++ b/Lib/calendar.py @@ -131,11 +131,9 @@ class Calendar(object): self.firstweekday = firstweekday # 0 = Monday, 6 = Sunday def getfirstweekday(self): - return self._firstweekday + return self._firstweekday % 7 def setfirstweekday(self, firstweekday): - if not MONDAY <= firstweekday <= SUNDAY: - raise IllegalWeekdayError(firstweekday) self._firstweekday = firstweekday firstweekday = property(getfirstweekday, setfirstweekday)