mirror of
https://github.com/python/cpython.git
synced 2025-11-01 10:45:30 +00:00
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.
This commit is contained in:
parent
76efcb4093
commit
75227fba1d
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue