8000 gh-98378: Add small format string example to strftime comments by zvory · Pull Request #98379 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-98378: Add small format strin 8000 g example to strftime comments #98379

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

Merged
merged 2 commits into from
Oct 18, 2022

Conversation

zvory
Copy link
Contributor
@zvory zvory commented Oct 18, 2022

A small example of what a full date and time would look like would help a lot of developers who may not realize that they should investigate time.h's strftime, run man strftime, or click through a series of docs on the python docs before they get to the actual definition here which still doesn't have an obvious copy-pastable example of "what the heck format does this thing actually expect?".

Automerge-Triggered-By: GH:rhettinger

@bedevere-bot
Copy link

Most changes to Python require a NEWS entry.

Please add it using the blurb_it web app or the blurb command-line tool.

@ghost
Copy link
ghost commented Oct 18, 2022

All commit authors signed the Contributor License Agreement.
CLA signed

Copy link
Member
@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my opinion this does not quite solve the problem.

Why? It is still not clear what does it mean: you are either familiar with its API, or %H:%M won't 8000 help much.

But, I see that there are some similar PRs: https://github.com/python/cpython/pull/31761/files

It indicates that a problem is quite common.

I think you can start a discussion about it first: what and how it can be done in a useful, consistent, and simple manner.

zvory and others added 2 commits October 18, 2022 08:08
A small example of what a full date and time would look like would help a lot of developers who may not realize that they should investigate `time.h`'s `strftime`, run `man strftime`, or click through a series of docs on the python docs before they get to the actual [definition here](https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes) which still doesn't have an obvious example of "what the heck format does this thing actually expect?".
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
@miss-islington
Copy link
Contributor

Status check is done, and it's a success ✅.

@miss-islington miss-islington merged commit 6ccca69 into python:main Oct 18, 2022
@miss-islington
Copy link
Contributor

Thanks @zvory for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 18, 2022
…ythonGH-98379)

A small example of what a full date and time would look like would help a lot of developers who may not realize that they should investigate `time.h`'s `strftime`, run `man strftime`, or click through a series of docs on the python docs before they get to the actual [definition here](https://docs.python.org/3/library/datetime.htmlGH-strftime-and-strptime-format-codes) which still doesn't have an obvious copy-pastable example of "what the heck format does this thing actually expect?".

Automerge-Triggered-By: GH:rhettinger
(cherry picked from commit 6ccca69)

Co-authored-by: Alex Zvorygin <grafetu@gmail.com>
@zvory
Copy link
Contributor Author
zvory commented Oct 20, 2022

@miss-islington Oh! What an easy process! I'm glad I was able to help, and I'm especially glad that it's this easy to help.

@zvory
Copy link
Contributor Author
zvory commented Oct 21, 2022

oh that's a bot lmfao

AlexWaygood added a commit that referenced this pull request Oct 22, 2022
…GH-98379) (#98395)

gh-98378: Add small format string example to strftime comments (GH-98379)

A small example of what a full date and time would look like would help a lot of developers who may not realize that they should investigate `time.h`'s `strftime`, run `man strftime`, or click through a series of docs on the python docs before they get to the actual [definition here](https://docs.python.org/3/library/datetime.htmlGH-strftime-and-strptime-format-codes) which still doesn't have an obvious copy-pastable example of "what the heck format does this thing actually expect?".

Automerge-Triggered-By: GH:rhettinger
(cherry picked from commit 6ccca69)

Co-authored-by: Alex Zvorygin <grafetu@gmail.com>

Co-authored-by: Alex Zvorygin <grafetu@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
@terryjreedy terryjreedy removed the needs backport to 3.11 only security fixes label Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants
0