Skip to content

Commit 3dd3b30

Browse files
[3.11] Fix more references to datetime and time classes (GH-114717) (GH-114726)
They could be confused with references to datetime and time modules. (cherry picked from commit 39c766b)
1 parent 55bddca commit 3dd3b30

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

Doc/library/datetime.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1664,7 +1664,7 @@ Usage of ``KabulTz`` from above::
16641664
:class:`.time` Objects
16651665
----------------------
16661666

1667-
A :class:`time` object represents a (local) time of day, independent of any particular
1667+
A :class:`.time` object represents a (local) time of day, independent of any particular
16681668
day, and subject to adjustment via a :class:`tzinfo` object.
16691669

16701670
.. class:: time(hour=0, minute=0, second=0, microsecond=0, tzinfo=None, *, fold=0)
@@ -2497,7 +2497,7 @@ information, which are supported in ``datetime.strptime`` but are discarded by
24972497
``time.strptime``.
24982498

24992499
For :class:`.time` objects, the format codes for year, month, and day should not
2500-
be used, as :class:`time` objects have no such values. If they're used anyway,
2500+
be used, as :class:`!time` objects have no such values. If they're used anyway,
25012501
``1900`` is substituted for the year, and ``1`` for the month and day.
25022502

25032503
For :class:`date` objects, the format codes for hours, minutes, seconds, and

Doc/library/mailbox.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,8 +1027,8 @@ When a :class:`!MaildirMessage` instance is created based upon a
10271027
leading "From " or trailing newline. For convenience, *time_* may be
10281028
specified and will be formatted appropriately and appended to *from_*. If
10291029
*time_* is specified, it should be a :class:`time.struct_time` instance, a
1030-
tuple suitable for passing to :meth:`time.strftime`, or ``True`` (to use
1031-
:meth:`time.gmtime`).
1030+
tuple suitable for passing to :func:`time.strftime`, or ``True`` (to use
1031+
:func:`time.gmtime`).
10321032

10331033

10341034
.. method:: get_flags()
@@ -1399,8 +1399,8 @@ When a :class:`!BabylMessage` instance is created based upon an
13991399
leading "From " or trailing newline. For convenience, *time_* may be
14001400
specified and will be formatted appropriately and appended to *from_*. If
14011401
*time_* is specified, it should be a :class:`time.struct_time` instance, a
1402-
tuple suitable for passing to :meth:`time.strftime`, or ``True`` (to use
1403-
:meth:`time.gmtime`).
1402+
tuple suitable for passing to :func:`time.strftime`, or ``True`` (to use
1403+
:func:`time.gmtime`).
14041404

14051405

14061406
.. method:: get_flags()

Doc/whatsnew/3.8.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -754,8 +754,8 @@ datetime
754754
--------
755755

756756
Added new alternate constructors :meth:`datetime.date.fromisocalendar` and
757-
:meth:`datetime.datetime.fromisocalendar`, which construct :class:`date` and
758-
:class:`datetime` objects respectively from ISO year, week number, and weekday;
757+
:meth:`datetime.datetime.fromisocalendar`, which construct :class:`~datetime.date` and
758+
:class:`~datetime.datetime` objects respectively from ISO year, week number, and weekday;
759759
these are the inverse of each class's ``isocalendar`` method.
760760
(Contributed by Paul Ganssle in :issue:`36004`.)
761761

0 commit comments

Comments
 (0)