From 5bfc01e8a7c04f4ecd5a8a9da02b1c12ae1a6754 Mon Sep 17 00:00:00 2001 From: John Belmonte Date: Wed, 1 Feb 2023 16:08:01 +0900 Subject: [PATCH] datetime.rst: fix combine() signature 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. --- Doc/library/datetime.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/datetime.rst b/Doc/library/datetime.rst index ebb5f319efda8d..2f1ab7c3dd4b51 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