File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
Misc/NEWS.d/next/Documentation Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -580,8 +580,11 @@ The :mod:`!calendar` module defines the following exceptions:
580580
581581.. exception :: IllegalMonthError(month)
582582
583- A subclass of :exc: `ValueError `,
583+ A subclass of both :exc: `ValueError ` and :exc: ` IndexError `,
584584 raised when the given month number is outside of the range 1-12 (inclusive).
585+ The :exc: `IndexError ` base class is preserved for backwards compatibility
586+ with code that caught :exc: `IndexError ` for bad month numbers prior to
587+ Python 3.13.
585588
586589 .. attribute :: month
587590
Original file line number Diff line number Diff line change 1+ Document that :class: `calendar.IllegalMonthError ` inherits from both
2+ :exc: `ValueError ` and :exc: `IndexError `, preserving :exc: `IndexError ` for
3+ backwards compatibility with code that caught it for bad month numbers prior
4+ to Python 3.13.
5+ ###########################################################################
You can’t perform that action at this time.
0 commit comments