Retro <[email protected]> added the comment:
I would just add an exception to the isleap() function.
def isleap(year):
"""Return 1 for leap years, 0 for non-leap years."""
try:
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
except TypeError:
# somehow inform the user that the argument 'year' must be an integer
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue10073>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com