-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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
Document PyUnicode_* API #46236
Comments
I was wandering whether the pointer returned by PyUnicode_AsString needs I notice that the documentation for several other unicode functions is PyUnicode_Resize It would probably be a good idea to polish up the documentation for |
In addition to the above mentioned functions I found these to be PyUnicode_DecodeUTF7 From the original list the following functions seem to have been removed: PyUnicode_InternImmortal I try to put together a patch for some of these during the weekend. |
Ok, here is my shot at a patch for at least some of the undocumented PyUnicode_FromFormat Please thoroughly review this patch since I didn't really digg into the |
The patch looks alright. I don't like the documentation for .. cfunction:: PyObject* PyUnicode_FromFormatV(const char *format, Equivalent to the function :cfunc:`PyUnicode_FromFormat`, except that |
Is it worth applying the patch given the complete rewrite of unicode for 3.3 via PEP-393? |
On 30.03.2013 13:09, Mark Lawrence wrote:
PEP-393 only changed the way Unicode is internally stored. |
Remaining undocumented functions: From this issue: PyUnicode_RSplit From bpo-10435: PyUnicode_IsIdentifier From bpo-18688: Py_UNICODE_REPLACEMENT_CHARACTER |
PyUnicode_DecodeCodePageStateful Following functions likely should be wrapped with "#ifndef Py_LIMITED_API": _PyUnicode_ClearStaticStrings |
""" _PyUnicode_ClearStaticStrings It's already the case since at least Python 3.7. Extract of Python 3.7 Include/unicodeobject.h: #ifndef Py_LIMITED_API
/* Return an interned Unicode object for an Identifier; may fail if there is no memory.*/
PyAPI_FUNC(PyObject*) _PyUnicode_FromId(_Py_Identifier*);
/* Clear all static strings. */
PyAPI_FUNC(void) _PyUnicode_ClearStaticStrings(void);
/* Fast equality check when the inputs are known to be exact unicode types
and where the hash values are equal (i.e. a very probable match) */
PyAPI_FUNC(int) _PyUnicode_EQ(PyObject *, PyObject *);
#endif /* !Py_LIMITED_API */ |
…eful` `PyUnicode_DecodeCodePageStateful` is in the limited C-API, and the document does not exist.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
Linked PRs
PyUnicode_DecodeCodePageStateful
#127934The text was updated successfully, but these errors were encountered: