Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-131798: JIT: Narrow the return type of _BINARY_SLICE to original container type#133527

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

Closed
Zheaoli wants to merge1 commit intopython:mainfromZheaoli:manjusaka/binary-slice

Conversation

Zheaoli
Copy link
Contributor

@ZheaoliZheaoli commentedMay 6, 2025
edited
Loading

I'm not sure this patch will take some effect.

In my original thought, I think if we can setup the return type to the original container type(tuple, list etc.), the optimizer will specialize some code in the test.

but the test is not work on my thought. I guess I miss something important here. cc@brandtbucher@Fidget-Spinner

…inal container typeSigned-off-by: Manjusaka <me@manjusaka.me>
@brandtbucher
Copy link
Member

@Zheaoli, I appreciate you taking the time to do this, butsomebody else is already working on_BINARY_SLICE. Part of the reason I created an issue for this was so we could coordinate the work, rather than having multiple people racing on the same tasks.

Is it okay if we close this? FYI, one issue I see here is that there is no guarantee that slicing an arbitrary object will give you the same class (we need to check for some common classes instead):

>>>importmmap>>>mm=mmap.mmap(-1,42)>>> type(mm)<class'mmap.mmap'>>>>type(mm[:])<class'bytes'>
Zheaoli reacted with heart emoji

@Zheaoli
Copy link
ContributorAuthor

I appreciate you taking the time to do this, but somebody else is already working on _BINARY_SLICE. Part of the reason I created an issue for this was so we could coordinate the work, rather than having multiple people racing on the same tasks.

Sorry about this! I have not noticed this has been assigned.

@Zheaoli
Copy link
ContributorAuthor

Is it okay if we close this?

Sure!

@ZheaoliZheaoli closed thisMay 7, 2025
@ZheaoliZheaoli deleted the manjusaka/binary-slice branchMay 7, 2025 02:42
@Zheaoli
Copy link
ContributorAuthor

one issue I see here is that there is no guarantee that slicing an arbitrary object will give you the same class (we need to check for some common classes instead):

Thanks about the explain. You prove one of my guess.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@Fidget-SpinnerFidget-SpinnerAwaiting requested review from Fidget-SpinnerFidget-Spinner will be requested when the pull request is marked ready for reviewFidget-Spinner is a code owner

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@Zheaoli@brandtbucher

[8]ページ先頭

©2009-2025 Movatter.jp