From: John Belmonte Date: Wed, 1 Feb 2023 10:01:28 +0000 (+0900) Subject: datetime.rst: fix combine() signature (#101490) X-Git-Tag: v3.12.0a5~55 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=75227fba1dd1683289d90ada7abba237bff55d14;p=thirdparty%2FPython%2Fcpython.git 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. --- diff --git a/Doc/library/datetime.rst b/Doc/library/datetime.rst index ebb5f319efda..2f1ab7c3dd4b 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