On this page
calendar.IllegalWeekdayError
Prev: calendar.IllegalMonthError | Up: calendar | Next: calendar.isleap
Rel: calendar.calendar, calendar.Calendar, calendar.Day, calendar.firstweekday
Ref: docs.python.org โ calendar.IllegalWeekdayError
Tags: #public #python3 #stdlib #calendar
Import
import calendar
from calendar import IllegalWeekdayError
Signature & Overview
calendar.IllegalWeekdayError(weekday)
calendar.IllegalWeekdayError class.
Methods & Attributes
IllegalWeekdayError.add_note(self, note, /)โ Add a note to the exceptionIllegalWeekdayError.with_traceback(self, tb, /)โ Set self.traceback to tb and return self.
Usage
import calendar
try:
calendar.setfirstweekday(9)
except calendar.IllegalWeekdayError:
assert True
Gotchas
- Subclass of
ValueError: Weekdays must be in0..6(Monday..Sunday).
REPL Inspect
from calendar import IllegalWeekdayError
help(IllegalWeekdayError)
Linked from
Related notes
- tuts/python3/stdlib_module/calendar/IllegalMonthError Linked here; links to this page; shared tags: #calendar, #stdlib
- tuts/python3/stdlib_module/calendar/isleap Linked here; links to this page; shared tags: #calendar, #stdlib
- tuts/python3/stdlib_module/calendar/calendar Linked here; shared tags: #calendar, #stdlib
- tuts/python3/stdlib_module/calendar/Calendar_class Linked here; shared tags: #calendar, #stdlib
- tuts/python3/stdlib_module/calendar/Day Linked here; shared tags: #calendar, #stdlib
- tuts/python3/stdlib_module/calendar/firstweekday Linked here; shared tags: #calendar, #stdlib
- tuts/python3/stdlib_module/calendar links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/calendar/HTMLCalendar shared tags: #calendar, #stdlib
- tuts/python3/stdlib_module/calendar/leapdays shared tags: #calendar, #stdlib
- tuts/python3/stdlib_module/calendar/LocaleHTMLCalendar shared tags: #calendar, #stdlib