Thanks to visit codestin.com
Credit goes to github.com

Skip to content

TYP: Trim down the _NestedSequence.__getitem__ signature #24273

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

Merged
merged 1 commit into from
Jul 31, 2023

Conversation

BvB93
Copy link
Member

@BvB93 BvB93 commented Jul 27, 2023

Closes #24265

Remove the slice-based overload so that it successfully supertypes deque.__getitem__, the latter lacking support for it despite subtyping the Sequence abstract base class.

Remove the `slice`-based overload such that it successfully supertypes `deque.__getitem__`
@charris charris added the 09 - Backport-Candidate PRs tagged should be backported label Jul 27, 2023
@charris charris added this to the 1.26.0 release milestone Jul 30, 2023
@seberg
Copy link
Member

seberg commented Jul 31, 2023

Looks right to me, thanks. Sequences don't need to support slicing.

@seberg seberg merged commit 8bbfa6d into numpy:main Jul 31, 2023
@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label Aug 3, 2023
@charris charris removed this from the 1.26.0 release milestone Aug 3, 2023
@charris charris changed the title TYP: Trim down the _NestedSequence.__getitem__ signature TYP: Trim down the _NestedSequence.__getitem__ signature Aug 3, 2023
@BvB93 BvB93 deleted the overload branch September 1, 2023 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Numpy Typing does not recognize a deque as a valid input for np.max
3 participants