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
Return new string for single subclass joins (Bug #1001011) #40742
Comments
At present, str.join contains a shortcut that returns a This can cause misbehaviour when subclasses of str are The attached patch removes the shortcut, and adds a |
Logged In: YES This is an important optimization for "true strings". It was |
Logged In: YES OK. I think I can do something with PyString_CheckExact that |
Logged In: YES New version of patch attached which uses PyString_CheckExact Should this optimisation be applied to the unicode join as well? |
Logged In: YES Oh - the test looks explicitly for the optimised behaviour |
Logged In: YES The patch looks good, it compiles okay, and the test_suite If Tim has no further issues, I will apply it. |
Logged In: YES Unassigned myself -- can't make time for this now. |
Logged In: YES Applied as: Thanks for the perfect patch. |
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:
The text was updated successfully, but these errors were encountered: