New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Calendar.itermonthdates OverflowError #59626
Comments
itermonthdates fails when working on the last month of 9999 |
LGTM |
Hi Cédric! while True:
yield date
- date += oneday
+ try:
+ date += oneday
+ except OverflowError:
+ break You might add a comment explaining why we may get an OverflowError here. I don't know the cost of adding a try/except in a loop. But the loop has 31 iterations or less, so it's maybe better to keep the explicit try/except around date += oneday. + def test_itermonthdates(self): Please use datetime.MAXYEAR instead of this hardcoded constant. |
Fix haypo comments |
New changeset bfdf366a779a by Ezio Melotti in branch '2.7': New changeset aa73e60f65e9 by Ezio Melotti in branch '3.2': New changeset 59a2807872d5 by Ezio Melotti in branch 'default': |
Fixed, thanks for the patch and the report! |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: