Skip to content

gh-76535: Add C API functions for changing case of a single codepoint #117117

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

Closed
wants to merge 1 commit into from

Conversation

lysnikolaou
Copy link
Member

@lysnikolaou lysnikolaou commented Mar 21, 2024

Additionally, move iscased and iscaseignorable from the internal API to the public API and add convenience macros. These are needed to handle the capital sigma case.

Closes #76535.


📚 Documentation preview 📚: https://cpython-previews--117117.org.readthedocs.build/

@lysnikolaou lysnikolaou force-pushed the add-unicode-casing-capi branch from 0a5c213 to 8facf19 Compare March 21, 2024 11:13
Comment on lines +226 to +233
.. c:function:: int Py_UNICODE_ISCASED(Py_UCS4 ch)

Return ``1`` or ``0`` depending on whether *ch* is a cased character.

.. c:function:: int Py_UNICODE_ISCASEIGNORABLE(Py_UCS4 ch)

Return ``1`` or ``0`` depending on whether *ch* is a case-ignorable character.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add the versionadded label :)

@serhiy-storchaka
Copy link
Member

Please add tests. I see a handful of flaws in the design and the implementation, the tests will expose them.

@lysnikolaou
Copy link
Member Author

Closing this in favor of #136176.

@lysnikolaou lysnikolaou closed this Jul 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unclear intention of deprecating Py_UNICODE_TOLOWER / Py_UNICODE_TOUPPER
3 participants