https://github.com/python/cpython/commit/a264c83e1355bc8423524176efa8297860e9083b
commit: a264c83e1355bc8423524176efa8297860e9083b
branch: 3.13
author: Miss Islington (bot) <[email protected]>
committer: tomasr8 <[email protected]>
date: 2026-07-18T14:52:11+02:00
summary:

[3.13] gh-153926: Fix documented parameter name for `calendar.calendar` and 
`calendar.prcal` (GH-153927) (#153939)

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 d12434b4661c6be7430002e66a54d920f7d4ca7f)

Co-authored-by: Vyron Vasileiadis <[email protected]>

files:
M Doc/library/calendar.rst

diff --git a/Doc/library/calendar.rst b/Doc/library/calendar.rst
index 7798b716f10c3a..005fcec915f49b 100644
--- a/Doc/library/calendar.rst
+++ b/Doc/library/calendar.rst
@@ -422,12 +422,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.

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to