PEP 737: gh-111696: Add %T format to PyUnicode_FromFormat()#111703
PEP 737: gh-111696: Add %T format to PyUnicode_FromFormat()#111703vstinner wants to merge 1 commit intopython:mainfrom
Conversation
0ebff22 to
50923bf
Compare
|
I updated my PR:
|
50923bf to
6c09d87
Compare
6c09d87 to
86da2a3
Compare
|
I reduced this PR to the bare minimum, non controversial and most important: only add %T format just to add a type name ( Later, we can extend the API:
Extended the API later is not incompatible with this change: they would be additions. |
|
@serhiy-storchaka: Are you ok with this minor addition to PyUnicode_FromFormat()? My work on the limited C API is blocked by this missing feature. As I wrote previously, the format can be extended later if someone wants to cover most cases, add an alternative format, etc. |
|
I would prefer to make the size modifier mandatory and use it as the format specifier in It is also less ambiguous. |
|
My previous attempt in 2018: #9122 |
|
Previous attempt, merged commit 886483e, which was reverted a few days later. |
|
I wrote PEP 737 – Unify type name formatting for these changes: see the PEP discussion. |
|
PEP 737 changed the API since this PR was created. I close this PR for now and will create a new one (or maybe reopen this PR) since PEP 737 will be approved. |
📚 Documentation preview 📚: https://cpython-previews--111703.org.readthedocs.build/