-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
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
Conversation
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
There was a problem hiding this 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.
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>
Status check is done, and it's a success ✅. |
Thanks @zvory for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11. |
…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>
@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. |
oh that's a bot lmfao |
…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>
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
'sstrftime
, runman 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