Skip to content
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

add ops for __reversed__ and __missing__ #28

Merged
merged 6 commits into from
Mar 21, 2024
Merged

Conversation

jorenham
Copy link
Owner

@jorenham jorenham commented Mar 21, 2024

This adds:

  • CanSequence[I: CanIndex, V] (combines CanLen and CanGetitem[I, V])
  • do_reversed: DoesReversed (type-corrected alias for builtins.reversed)
  • do_missing: DoesMissing (calls .__missing__())

Note that the reversed typeshed annotations are currently incorrect, see python/typeshed#11645

@jorenham jorenham changed the title ops for __reversed__ and __missing__ add ops for __reversed__ and __missing__ Mar 21, 2024
@jorenham jorenham merged commit 4d3e376 into dev Mar 21, 2024
4 checks passed
@jorenham jorenham deleted the feature/missing-reversed branch March 21, 2024 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant