diff options
author | John Belmonte <john@neggie.net> | 2023-02-01 10:01:28 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-01 10:01:28 (GMT) |
commit | 75227fba1dd1683289d90ada7abba237bff55d14 (patch) | |
tree | 2ac8d9c83437ffeae8aa5cfdfab34f05411ee33e /Doc | |
parent | 76efcb40930d1584e8706f015d0e5475fb16acb5 (diff) | |
download | cpython-75227fba1dd1683289d90ada7abba237bff55d14.zip cpython-75227fba1dd1683289d90ada7abba237bff55d14.tar.gz cpython-75227fba1dd1683289d90ada7abba237bff55d14.tar.bz2 |
datetime.rst: fix combine() signature (#101490)
The default `tzinfo` param of the `combine()` signature pseudocode was erroneously `self.tzinfo`.
`self` has no meaning in the context of a classmethod, and the datetime class itself has no `tzinfo` attribute. The correct default pseudocode is `time.tzinfo`, reflecting that the default is the `tzinfo` attribute of the `time` parameter.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/datetime.rst | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/library/datetime.rst b/Doc/library/datetime.rst index ebb5f31..2f1ab7c 100644 --- a/Doc/library/datetime.rst +++ b/Doc/library/datetime.rst @@ -975,7 +975,7 @@ Other constructors, all class methods: microsecond of the result are all 0, and :attr:`.tzinfo` is ``None``. -.. classmethod:: datetime.combine(date, time, tzinfo=self.tzinfo) +.. classmethod:: datetime.combine(date, time, tzinfo=time.tzinfo) Return a new :class:`.datetime` object whose date components are equal to the given :class:`date` object's, and whose time components |