-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
gh-131798: JIT: Assign type to sliced string #133609
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
base: main
Are you sure you want to change the base?
Conversation
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 is a user-facing change. This probably needs a NEWS entry
*sorry, this isn't a user-facing change. I was tired and not thinking straight. But still would be best for a news entry
This isn’t a user-facing change (but a NEWS entry doesn’t hurt). |
sorry, did I type that? my brain wasn't working. Yes, you're right, a news entry would be best here and this isn't a user facing change. |
// Slicing a string always returns a string. | ||
// TODO: We can apply this to lists and tuples as well. | ||
// We'll start with string to simplify the process. |
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.
Wanna just add the others to this PR too? It's just two lines here and a couple of tests.
Slicing a string always returns a string.
Make the optimizer assign a string type to the result of slicing a string.
Follow up to-do: apply this to lists and tuples too.
@brandtbucher