Skip to content

Commit b5b44d2

Browse files
authored
datetime.rst: improve combine() docs
The explanation on handling of `datetime` as the `date` arg was confusingly combined with unrelated text, and omitted proper formatting of arg names.
1 parent cd0fe5b commit b5b44d2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Doc/library/datetime.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -984,9 +984,10 @@ Other constructors, all class methods:
984984
is used.
985985

986986
For any :class:`.datetime` object *d*,
987-
``d == datetime.combine(d.date(), d.time(), d.tzinfo)``. If date is a
988-
:class:`.datetime` object, its time components and :attr:`.tzinfo` attributes
989-
are ignored.
987+
``d == datetime.combine(d.date(), d.time(), d.tzinfo)``.
988+
989+
If the *date* argument is a :class:`.datetime` object, its time components and
990+
:attr:`.tzinfo` attributes are ignored.
990991

991992
.. versionchanged:: 3.6
992993
Added the *tzinfo* argument.

0 commit comments

Comments
 (0)