Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
bpo-34392: Add sys. _is_interned()#8755
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
sys_isinterned_impl(PyObject *module, PyObject *string) | ||
/*[clinic end generated code: output=0364c3f36499f868 input=2fe09bef8edf732e]*/ | ||
{ | ||
return PyUnicode_CHECK_INTERNED(string); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Question: Currentlysys.intern
makes aPyUnicode_CheckExact(s)
over the string so interning a subclass of a string gives aTypeError
back. This returnsFalse
. Does it make sense to do a exact check to mirror the interface ofsys.intern
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I don't know.
@methane, should this be merged after fixing the merge conflicts? Thanks! |
Up to@serhiy-storchaka. He wanted this API to write some tests. |
Misc/NEWS.d/next/Core and Builtins/2018-08-13-13-25-15.bpo-34392.9kIlMF.rst OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
…92.9kIlMF.rstCo-authored-by: Inada Naoki <songofacandy@gmail.com>
There was a problem hiding this 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 commentedNov 25, 2022
When you're done making the requested changes, leave the comment: |
I have made the requested changes; please review again. |
Merge conflicts are resolved.
Uh oh!
There was an error while loading.Please reload this page.
https://bugs.python.org/issue34392
#78573