Skip to content

Commit 39c766b

Browse files
Fix more references to datetime and time classes (GH-114717)
They could be confused with references to datetime and time modules.
1 parent e351ca3 commit 39c766b

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

Doc/library/datetime.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1255,7 +1255,7 @@ Instance methods:
12551255
``tzinfo=None`` can be specified to create a naive datetime from an aware
12561256
datetime with no conversion of date and time data.
12571257

1258-
:class:`datetime` objects are also supported by generic function
1258+
:class:`.datetime` objects are also supported by generic function
12591259
:func:`copy.replace`.
12601260

12611261
.. versionchanged:: 3.6
@@ -1678,7 +1678,7 @@ Usage of ``KabulTz`` from above::
16781678
:class:`.time` Objects
16791679
----------------------
16801680

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

16841684
.. class:: time(hour=0, minute=0, second=0, microsecond=0, tzinfo=None, *, fold=0)
@@ -1836,7 +1836,7 @@ Instance methods:
18361836
``tzinfo=None`` can be specified to create a naive :class:`.time` from an
18371837
aware :class:`.time`, without conversion of the time data.
18381838

1839-
:class:`time` objects are also supported by generic function
1839+
:class:`.time` objects are also supported by generic function
18401840
:func:`copy.replace`.
18411841

18421842
.. versionchanged:: 3.6
@@ -2522,7 +2522,7 @@ information, which are supported in ``datetime.strptime`` but are discarded by
25222522
``time.strptime``.
25232523

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

25282528
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
@@ -1136,8 +1136,8 @@ When a :class:`!MaildirMessage` instance is created based upon a
11361136
leading "From " or trailing newline. For convenience, *time_* may be
11371137
specified and will be formatted appropriately and appended to *from_*. If
11381138
*time_* is specified, it should be a :class:`time.struct_time` instance, a
1139-
tuple suitable for passing to :meth:`time.strftime`, or ``True`` (to use
1140-
:meth:`time.gmtime`).
1139+
tuple suitable for passing to :func:`time.strftime`, or ``True`` (to use
1140+
:func:`time.gmtime`).
11411141

11421142

11431143
.. method:: get_flags()
@@ -1508,8 +1508,8 @@ When a :class:`!BabylMessage` instance is created based upon an
15081508
leading "From " or trailing newline. For convenience, *time_* may be
15091509
specified and will be formatted appropriately and appended to *from_*. If
15101510
*time_* is specified, it should be a :class:`time.struct_time` instance, a
1511-
tuple suitable for passing to :meth:`time.strftime`, or ``True`` (to use
1512-
:meth:`time.gmtime`).
1511+
tuple suitable for passing to :func:`time.strftime`, or ``True`` (to use
1512+
:func:`time.gmtime`).
15131513

15141514

15151515
.. 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

Misc/NEWS.d/3.13.0a1.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2276,7 +2276,7 @@ creation.
22762276
.. nonce: m2H5Bk
22772277
.. section: Library
22782278
2279-
Remove unnecessary extra ``__slots__`` in :py:class:`datetime`\'s pure
2279+
Remove unnecessary extra ``__slots__`` in :class:`~datetime.datetime`\'s pure
22802280
python implementation to reduce memory size, as they are defined in the
22812281
superclass. Patch by James Hilton-Balfe
22822282

0 commit comments

Comments
 (0)