Skip to content

gh-103883: Doc: Move PyUnicode_FromObject doc #103913

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
Apr 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions Doc/c-api/unicode.rst
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,15 @@ APIs:
arguments.


.. c:function:: PyObject* PyUnicode_FromObject(PyObject *obj)

Copy an instance of a Unicode subtype to a new true Unicode object if
necessary. If *obj* is already a true Unicode object (not a subtype),
return the reference with incremented refcount.

Objects other than Unicode or its subtypes will cause a :exc:`TypeError`.


.. c:function:: PyObject* PyUnicode_FromEncodedObject(PyObject *obj, \
const char *encoding, const char *errors)

Expand Down Expand Up @@ -616,15 +625,6 @@ APIs:
.. versionadded:: 3.3


.. c:function:: PyObject* PyUnicode_FromObject(PyObject *obj)

Copy an instance of a Unicode subtype to a new true Unicode object if
necessary. If *obj* is already a true Unicode object (not a subtype),
return the reference with incremented refcount.

Objects other than Unicode or its subtypes will cause a :exc:`TypeError`.


Locale Encoding
"""""""""""""""

Expand Down