You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Docs: calendar.calendar and calendar.prcal document parameter as year but it is named theyear #153926
However, both are bound methods of the module's TextCalendar instance (calendar = c.formatyear, prcal = c.pryear in Lib/calendar.py), whose first parameter is named theyear:
As a result the documented keyword name does not work — calendar.calendar(year=2025) raises TypeError, while calendar.calendar(theyear=2025) succeeds.
The documentation should be updated to use the real parameter name theyear, which also matches the sibling month() and prmonth() functions documented just above.
Activity
Merge branch 'main' into fix-pythongh-153926-calendar-theyear-docs
Merge branch 'main' into fix-pythongh-153926-calendar-theyear-docs
gh-153926: Fix documented parameter name for `calendar.calendar` and …
[3.15] gh-153926: Fix documented parameter name for `calendar.calenda…
[3.13] gh-153926: Fix documented parameter name for `calendar.calenda…
[3.14] gh-153926: Fix documented parameter name for `calendar.calenda…