They could be confused with references to datetime and time modules.
``tzinfo=None`` can be specified to create a naive datetime from an aware
datetime with no conversion of date and time data.
- :class:`datetime` objects are also supported by generic function
+ :class:`.datetime` objects are also supported by generic function
:func:`copy.replace`.
.. versionchanged:: 3.6
:class:`.time` Objects
----------------------
-A :class:`time` object represents a (local) time of day, independent of any particular
+A :class:`.time` object represents a (local) time of day, independent of any particular
day, and subject to adjustment via a :class:`tzinfo` object.
.. class:: time(hour=0, minute=0, second=0, microsecond=0, tzinfo=None, *, fold=0)
``tzinfo=None`` can be specified to create a naive :class:`.time` from an
aware :class:`.time`, without conversion of the time data.
- :class:`time` objects are also supported by generic function
+ :class:`.time` objects are also supported by generic function
:func:`copy.replace`.
.. versionchanged:: 3.6
``time.strptime``.
For :class:`.time` objects, the format codes for year, month, and day should not
-be used, as :class:`time` objects have no such values. If they're used anyway,
+be used, as :class:`!time` objects have no such values. If they're used anyway,
``1900`` is substituted for the year, and ``1`` for the month and day.
For :class:`date` objects, the format codes for hours, minutes, seconds, and
leading "From " or trailing newline. For convenience, *time_* may be
specified and will be formatted appropriately and appended to *from_*. If
*time_* is specified, it should be a :class:`time.struct_time` instance, a
- tuple suitable for passing to :meth:`time.strftime`, or ``True`` (to use
- :meth:`time.gmtime`).
+ tuple suitable for passing to :func:`time.strftime`, or ``True`` (to use
+ :func:`time.gmtime`).
.. method:: get_flags()
leading "From " or trailing newline. For convenience, *time_* may be
specified and will be formatted appropriately and appended to *from_*. If
*time_* is specified, it should be a :class:`time.struct_time` instance, a
- tuple suitable for passing to :meth:`time.strftime`, or ``True`` (to use
- :meth:`time.gmtime`).
+ tuple suitable for passing to :func:`time.strftime`, or ``True`` (to use
+ :func:`time.gmtime`).
.. method:: get_flags()
--------
Added new alternate constructors :meth:`datetime.date.fromisocalendar` and
-:meth:`datetime.datetime.fromisocalendar`, which construct :class:`date` and
-:class:`datetime` objects respectively from ISO year, week number, and weekday;
+:meth:`datetime.datetime.fromisocalendar`, which construct :class:`~datetime.date` and
+:class:`~datetime.datetime` objects respectively from ISO year, week number, and weekday;
these are the inverse of each class's ``isocalendar`` method.
(Contributed by Paul Ganssle in :issue:`36004`.)
.. nonce: m2H5Bk
.. section: Library
-Remove unnecessary extra ``__slots__`` in :py:class:`datetime`\'s pure
+Remove unnecessary extra ``__slots__`` in :class:`~datetime.datetime`\'s pure
python implementation to reduce memory size, as they are defined in the
superclass. Patch by James Hilton-Balfe