mirror of
https://github.com/python/cpython.git
synced 2025-10-02 13:22:19 +00:00
[3.12] GH-108202: Document `calendar
` exceptions (GH-108398) (#108467)
GH-108202: Document ``calendar`` exceptions (GH-108398)
(cherry picked from commit 135098743a
)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
This commit is contained in:
parent
9a225d7d5b
commit
c5448ab6d4
1 changed files with 23 additions and 0 deletions
|
@ -469,6 +469,29 @@ The :mod:`calendar` module exports the following data attributes:
|
|||
|
||||
Aliases for day numbers, where ``MONDAY`` is ``0`` and ``SUNDAY`` is ``6``.
|
||||
|
||||
|
||||
The :mod:`calendar` module defines the following exceptions:
|
||||
|
||||
.. exception:: IllegalMonthError(month)
|
||||
|
||||
A subclass of :exc:`ValueError`,
|
||||
raised when the given month number is outside of the range 1-12 (inclusive).
|
||||
|
||||
.. attribute:: month
|
||||
|
||||
The invalid month number.
|
||||
|
||||
|
||||
.. exception:: IllegalWeekdayError(weekday)
|
||||
|
||||
A subclass of :exc:`ValueError`,
|
||||
raised when the given weekday number is outside of the range 0-6 (inclusive).
|
||||
|
||||
.. attribute:: weekday
|
||||
|
||||
The invalid weekday number.
|
||||
|
||||
|
||||
.. seealso::
|
||||
|
||||
Module :mod:`datetime`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue