Skip to content

Commit daca111

Browse files
committed
Review class references
1 parent 04fb325 commit daca111

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

Doc/library/datetime.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -894,7 +894,7 @@ from a :class:`date` object and a :class:`.time` object.
894894

895895
Like a :class:`date` object, :class:`.datetime` assumes the current Gregorian
896896
calendar extended in both directions; like a :class:`.time` object,
897-
:class:`.datetime` assumes there are exactly 3600\*24 seconds in every day.
897+
:class:`!datetime` assumes there are exactly 3600\*24 seconds in every day.
898898

899899
Constructor:
900900

@@ -1060,7 +1060,7 @@ Other constructors, all class methods:
10601060
are equal to the given :class:`.time` object's. If the *tzinfo*
10611061
argument is provided, its value is used to set the :attr:`.tzinfo` attribute
10621062
of the result, otherwise the :attr:`~.time.tzinfo` attribute of the *time* argument
1063-
is used. If the *date* argument is a :class:`.datetime` object, its time components
1063+
is used. If the *date* argument is a :class:`!datetime` object, its time components
10641064
and :attr:`.tzinfo` attributes are ignored.
10651065

10661066
For any :class:`.datetime` object ``d``,
@@ -1487,7 +1487,7 @@ Instance methods:
14871487

14881488
Naive :class:`.datetime` instances are assumed to represent local
14891489
time and this method relies on the platform C :c:func:`mktime`
1490-
function to perform the conversion. Since :class:`.datetime`
1490+
function to perform the conversion. Since :class:`!datetime`
14911491
supports wider range of values than :c:func:`mktime` on many
14921492
platforms, this method may raise :exc:`OverflowError` or :exc:`OSError`
14931493
for times far in the past or far in the future.
@@ -1944,8 +1944,8 @@ Instance methods:
19441944
19451945
Return a :class:`.time` with the same value, except for those attributes given
19461946
new values by whichever keyword arguments are specified. Note that
1947-
``tzinfo=None`` can be specified to create a naive :class:`.time` from an
1948-
aware :class:`.time`, without conversion of the time data.
1947+
``tzinfo=None`` can be specified to create a naive :class:`!time` from an
1948+
aware :class:`!time`, without conversion of the time data.
19491949

19501950
:class:`.time` objects are also supported by generic function
19511951
:func:`copy.replace`.
@@ -2204,18 +2204,18 @@ Examples of working with a :class:`.time` object::
22042204

22052205

22062206
These methods are called by a :class:`.datetime` or :class:`.time` object, in
2207-
response to their methods of the same names. A :class:`.datetime` object passes
2208-
itself as the argument, and a :class:`.time` object passes ``None`` as the
2207+
response to their methods of the same names. A :class:`!datetime` object passes
2208+
itself as the argument, and a :class:`!time` object passes ``None`` as the
22092209
argument. A :class:`tzinfo` subclass's methods should therefore be prepared to
2210-
accept a *dt* argument of ``None``, or of class :class:`.datetime`.
2210+
accept a *dt* argument of ``None``, or of class :class:`!datetime`.
22112211

22122212
When ``None`` is passed, it's up to the class designer to decide the best
22132213
response. For example, returning ``None`` is appropriate if the class wishes to
22142214
say that time objects don't participate in the :class:`tzinfo` protocols. It
22152215
may be more useful for ``utcoffset(None)`` to return the standard UTC offset, as
22162216
there is no other convention for discovering the standard offset.
22172217

2218-
When a :class:`.datetime` object is passed in response to a :class:`.datetime`
2218+
When a :class:`.datetime` object is passed in response to a :class:`!datetime`
22192219
method, ``dt.tzinfo`` is the same object as *self*. :class:`tzinfo` methods can
22202220
rely on this, unless user code calls :class:`tzinfo` methods directly. The
22212221
intent is that the :class:`tzinfo` methods interpret *dt* as being in local

0 commit comments

Comments
 (0)