Index: calendar.py =================================================================== --- calendar.py (revision 85658) +++ calendar.py (working copy) @@ -95,8 +95,10 @@ def isleap(year): - """Return 1 for leap years, 0 for non-leap years.""" - return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) + """Return True for leap years, False for non-leap years.""" + if year == 0: + raise ValueError('year 0 does not exist') + return (year % 4 == 0) and (year % 100 != 0) or (year % 400 == 0) def leapdays(y1, y2):