Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

datetime.rst: fix combine() signature #101490

Merged
merged 1 commit into from
Feb 1, 2023
Merged

datetime.rst: fix combine() signature #101490

merged 1 commit into from
Feb 1, 2023

Conversation

belm0
Copy link
Contributor

@belm0 belm0 commented Feb 1, 2023

In the documented combine() signature, the default tzinfo param 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 pseudocode for the default is time.tzinfo, reflecting that the default is the tzinfo attribute of the time parameter.

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.
@abalkin abalkin merged commit 75227fb into python:main Feb 1, 2023
@belm0 belm0 deleted the patch-4 branch February 1, 2023 11:41
carljm added a commit to carljm/cpython that referenced this pull request Feb 1, 2023
* main:
  pythongh-98831: rewrite PUSH_EXC_INFO and conditional jumps in the instruction definition DSL (python#101481)
  pythongh-98831: Modernize the LOAD_ATTR family (python#101488)
  pythongh-101498 : Fix asyncio.Timeout example in docs (python#101499)
  pythongh-101454: fix documentation for END_ASYNC_FOR (python#101455)
  pythongh-101277: Isolate itertools, add group and _grouper types to module state (python#101302)
  pythongh-101317: Add `ssl_shutdown_timeout` parameter for `asyncio.StreamWriter.start_tls` (python#101335)
  datetime.rst: fix combine() signature (python#101490)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip issue skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants