Skip to content
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

bpo-34392: Add sys. _is_interned() #8755

Merged
merged 11 commits into from Dec 4, 2023

Conversation

serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka commented Aug 13, 2018

sys_isinterned_impl(PyObject *module, PyObject *string)
/*[clinic end generated code: output=0364c3f36499f868 input=2fe09bef8edf732e]*/
{
return PyUnicode_CHECK_INTERNED(string);
Copy link
Member

Choose a reason for hiding this comment

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

Question: Currently sys.internmakes a PyUnicode_CheckExact(s) over the string so interning a subclass of a string gives a TypeError back. This returns False. Does it make sense to do a exact check to mirror the interface of sys.intern?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't know.

@csabella
Copy link
Contributor

@methane, should this be merged after fixing the merge conflicts? Thanks!

@methane methane changed the title bpo-34392: Add sys.isinterned(). bpo-34392: Add sys. _is_interned() May 26, 2020
@methane
Copy link
Member

methane commented May 26, 2020

@methane, should this be merged after fixing the merge conflicts? Thanks!

Up to @serhiy-storchaka. He wanted this API to write some tests.

…92.9kIlMF.rst

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
Copy link
Member

@iritkatriel iritkatriel left a comment

Choose a reason for hiding this comment

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

This has merge conflicts now.

@bedevere-bot
Copy link

When you're done making the requested changes, leave the comment: I have made the requested changes; please review again.

@serhiy-storchaka
Copy link
Member Author

I have made the requested changes; please review again.

@serhiy-storchaka serhiy-storchaka dismissed iritkatriel’s stale review December 4, 2023 09:06

Merge conflicts are resolved.

@serhiy-storchaka serhiy-storchaka merged commit dee7bee into python:main Dec 4, 2023
32 of 33 checks passed
@serhiy-storchaka serhiy-storchaka deleted the sys-isinterned branch December 4, 2023 09:09
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-feature A feature request or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants