make lists uniformly integers for the benefit of pypy

This commit is contained in:
Benjamin Peterson 2013-08-29 17:27:57 -04:00
parent 6cc50391a6
commit f908efb75c
1 changed files with 3 additions and 2 deletions

View File

@ -23,9 +23,10 @@ _MAXORDINAL = 3652059 # date.max.toordinal()
# for all computations. See the book for algorithms for converting between
# proleptic Gregorian ordinals and many other calendar systems.
_DAYS_IN_MONTH = [None, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
# -1 is a placeholder for 0.
_DAYS_IN_MONTH = [-1, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
_DAYS_BEFORE_MONTH = [None]
_DAYS_BEFORE_MONTH = [-1] # -1 is a placeholder for 0.
dbm = 0
for dim in _DAYS_IN_MONTH[1:]:
_DAYS_BEFORE_MONTH.append(dbm)