GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — datetime.rst: fix combine() signature by belm0 · Pull Request #101490 · python/cpython

Conversation

@belm0

@belm0 belm0 commented Feb 1, 2023

Copy link
Copy Markdown
Contributor

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@belm0
datetime.rst: fix combine() signature
5bfc01e
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.
@belm0
belm0 requested review from abalkin and pganssle as code owners February 1, 2023 07:10
@bedevere-bot bedevere-bot added awaiting review docs Documentation in the Doc dir skip news labels Feb 1, 2023
abalkin
abalkin approved these changes Feb 1, 2023
View reviewed changes
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting review labels Feb 1, 2023
@abalkin abalkin added the skip issue label Feb 1, 2023
@abalkin
abalkin merged commit 75227fb into python:main Feb 1, 2023
@bedevere-bot bedevere-bot removed the awaiting merge label 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
@carljm
Merge branch 'main' into inlinecomp2
8b76051
* 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

Reviewers

@abalkin abalkin abalkin approved these changes
@pganssle pganssle Awaiting requested review from pganssle pganssle is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

docs Documentation in the Doc dir skip issue skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@belm0 @abalkin @bedevere-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.