gh-98378: Add small format string example to strftime comments#98379
gh-98378: Add small format string example to strftime comments#98379miss-islington merged 2 commits intopython:mainfrom
Conversation
|
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
sobolevn
left a comment
There was a problem hiding this comment.
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 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