Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
gh-153926: Fix documented parameter name for calendar.calendar and …
…`calendar.prcal` (GH-153927)

gh-153926: Fix documented parameter name for calendar.calendar and calendar.prcal

calendar.calendar() and calendar.prcal() are bound methods of the
module's TextCalendar instance, whose first parameter is named theyear,
but the documentation named it year, so the documented keyword raised
TypeError. Update the documentation to match the real signature, which
also matches the sibling month() and prmonth() functions.
(cherry picked from commit d12434b)

Co-authored-by: Vyron Vasileiadis <hi@fedonman.com>
  • Loading branch information
fedonman authored and miss-islington committed Jul 18, 2026
commit 863f3f7f359514b456436c455e17c174490fe544
4 changes: 2 additions & 2 deletions Doc/library/calendar.rst
Original file line number Diff line number Diff line change
Expand Up @@ -430,12 +430,12 @@ For simple text calendars this module provides the following functions.
of the :class:`TextCalendar` class.


.. function:: prcal(year, w=0, l=0, c=6, m=3)
.. function:: prcal(theyear, w=0, l=0, c=6, m=3)

Prints the calendar for an entire year as returned by :func:`calendar`.


.. function:: calendar(year, w=2, l=1, c=6, m=3)
.. function:: calendar(theyear, w=2, l=1, c=6, m=3)

Returns a 3-column calendar for an entire year as a multi-line string using
the :meth:`~TextCalendar.formatyear` of the :class:`TextCalendar` class.
Expand Down
Loading