Skip to content

bpo-34595: Add %T format to PyUnicode_FromFormatV() #9080

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 1 commit into from
Sep 7, 2018
Merged

bpo-34595: Add %T format to PyUnicode_FromFormatV() #9080

merged 1 commit into from
Sep 7, 2018

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Sep 6, 2018

  • Add %T format to PyUnicode_FromFormatV(), and so to
    PyUnicode_FromFormat() and PyErr_Format(), to format an object type
    name: equivalent to "%s" with Py_TYPE(obj)->tp_name.
  • Replace Py_TYPE(obj)->tp_name with %T format in unicodeobject.c.
  • Add unit test on %T format.
  • Rename unicode_fromformat_write_cstr() to
    unicode_fromformat_write_utf8(), to make the intent more explicit.

https://bugs.python.org/issue34595

* Add %T format to PyUnicode_FromFormatV(), and so to
  PyUnicode_FromFormat() and PyErr_Format(), to format an object type
  name: equivalent to "%s" with Py_TYPE(obj)->tp_name.
* Replace Py_TYPE(obj)->tp_name with %T format in unicodeobject.c.
* Add unit test on %T format.
* Rename unicode_fromformat_write_cstr() to
  unicode_fromformat_write_utf8(), to make the intent more explicit.
@vstinner vstinner merged commit 886483e into python:master Sep 7, 2018
@vstinner vstinner deleted the unicode_fromformat_t branch September 7, 2018 16:01
@vstinner
Copy link
Member Author

vstinner commented Sep 7, 2018

Thanks for the review @JulienPalard and @pablogsal!

vstinner added a commit that referenced this pull request Sep 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants