Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f5ad63f

Browse filesBrowse files
authored
datetime.rst: improve combine() docs (#101338)
The explanation on handling of datetime as the date arg was confusingly mixed with an unrelated item, and lacked proper arg name formatting.
1 parent a226278 commit f5ad63f
Copy full SHA for f5ad63f

File tree

Expand file treeCollapse file tree

1 file changed

+3
-4
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-4
lines changed
Open diff view settings
Collapse file

‎Doc/library/datetime.rst‎

Copy file name to clipboardExpand all lines: Doc/library/datetime.rst
+3-4Lines changed: 3 additions & 4 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -982,12 +982,11 @@ Other constructors, all class methods:
982982
are equal to the given :class:`.time` object's. If the *tzinfo*
983983
argument is provided, its value is used to set the :attr:`.tzinfo` attribute
984984
of the result, otherwise the :attr:`~.time.tzinfo` attribute of the *time* argument
985-
is used.
985+
is used. If the *date* argument is a :class:`.datetime` object, its time components
986+
and :attr:`.tzinfo` attributes are ignored.
986987

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

992991
.. versionchanged:: 3.6
993992
Added the *tzinfo* argument.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.