[Python-checkins] r43591 - python/trunk/Lib/calendar.py

walter.doerwald python-checkins at python.org
Mon Apr 3 17:21:59 CEST 2006


Author: walter.doerwald
Date: Mon Apr  3 17:21:59 2006
New Revision: 43591

Modified:
   python/trunk/Lib/calendar.py
Log:
Always return firstweekday % 7 instead of complaining
on setting.


Modified: python/trunk/Lib/calendar.py
==============================================================================
--- python/trunk/Lib/calendar.py	(original)
+++ python/trunk/Lib/calendar.py	Mon Apr  3 17:21:59 2006
@@ -131,11 +131,9 @@
         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)
 


More information about the Python-checkins mailing list