Skip to content
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

gh-126476: Raise IllegalMonthError for calendar.formatmonth method when the input month is not corret #126484

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Zheaoli
Copy link
Contributor

@Zheaoli Zheaoli commented Nov 6, 2024

@ericvsmith
Copy link
Member

I'm not sure this is a good idea. If someone was catching IndexError previously, then the change to IllegalMonthError will break their code.

@ZeroIntensity
Copy link
Member

Yeah, Eric is right. I would be ok with this if IllegalMonthError also inherited from IndexError.

@Zheaoli
Copy link
Contributor Author

Zheaoli commented Nov 7, 2024

I have update this PR,PTAL @ericvsmith @ZeroIntensity

Copy link
Member

@ZeroIntensity ZeroIntensity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure how to feel about this. It works, and the implementation looks fine, but it's also a little hacky so I'm hesitant to approve. I'll wait for Eric's input.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No proper validation for month in Calendar Module
3 participants