Skip to content

Commit 4041251

Browse files
authored
gh-103883: Doc: Move PyUnicode_FromObject doc (GH-103913)
This API is one of Unicode creator APIs. This APIs should not be placed in PEP 393 deprecated APIs. Fixes: gh-103883 (cherry picked from commit ce2383e)
1 parent c0b538b commit 4041251

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

Doc/c-api/unicode.rst

+9-9
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,15 @@ APIs:
572572
arguments.
573573
574574
575+
.. c:function:: PyObject* PyUnicode_FromObject(PyObject *obj)
576+
577+
Copy an instance of a Unicode subtype to a new true Unicode object if
578+
necessary. If *obj* is already a true Unicode object (not a subtype),
579+
return the reference with incremented refcount.
580+
581+
Objects other than Unicode or its subtypes will cause a :exc:`TypeError`.
582+
583+
575584
.. c:function:: PyObject* PyUnicode_FromEncodedObject(PyObject *obj, \
576585
const char *encoding, const char *errors)
577586
@@ -752,15 +761,6 @@ Extension modules can continue using them, as they will not be removed in Python
752761
:c:func:`PyUnicode_GET_LENGTH`.
753762
754763
755-
.. c:function:: PyObject* PyUnicode_FromObject(PyObject *obj)
756-
757-
Copy an instance of a Unicode subtype to a new true Unicode object if
758-
necessary. If *obj* is already a true Unicode object (not a subtype),
759-
return the reference with incremented refcount.
760-
761-
Objects other than Unicode or its subtypes will cause a :exc:`TypeError`.
762-
763-
764764
Locale Encoding
765765
"""""""""""""""
766766

0 commit comments

Comments
 (0)