]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-108202: Document calendar.Calendar.firstweekday (GH-128566) (#128580)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 7 Jan 2025 08:06:52 +0000 (09:06 +0100)
committerGitHub <noreply@github.com>
Tue, 7 Jan 2025 08:06:52 +0000 (08:06 +0000)
(cherry picked from commit b3cbd8f1b58b9e71df20bdda9960e7d3190c509e)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
Doc/library/calendar.rst

index 9106092eb123d7b063a374da681f51f4ff23968a..88a90f420e9887684726710f093ad261f3413ec3 100644 (file)
@@ -38,21 +38,33 @@ interpreted as prescribed by the ISO 8601 standard.  Year 0 is 1 BC, year -1 is
    itself. This is the job of subclasses.
 
 
-   :class:`Calendar` instances have the following methods:
+   :class:`Calendar` instances have the following methods and attributes:
+
+   .. attribute:: firstweekday
+
+      The first weekday as an integer (0--6).
+
+      This property can also be set and read using
+      :meth:`~Calendar.setfirstweekday` and
+      :meth:`~Calendar.getfirstweekday` respectively.
 
    .. method:: getfirstweekday()
 
-      Return an :class:`int` for the current first weekday (0-6).
+      Return an :class:`int` for the current first weekday (0--6).
+
+      Identical to reading the :attr:`~Calendar.firstweekday` property.
 
    .. method:: setfirstweekday(firstweekday)
 
-      Set the first weekday to *firstweekday*, passed as an :class:`int` where Monday is 0 and Sunday is 6.
+      Set the first weekday to *firstweekday*, passed as an :class:`int` (0--6)
+
+      Identical to setting the :attr:`~Calendar.firstweekday` property.
 
    .. method:: iterweekdays()
 
       Return an iterator for the week day numbers that will be used for one
       week.  The first value from the iterator will be the same as the value of
-      the :attr:`firstweekday` property.
+      the :attr:`~Calendar.firstweekday` property.
 
 
    .. method:: itermonthdates(year, month)