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

TypeVar for SupportsAllComparisons #28

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dijkstracula
Copy link

Many comparison types, like SupportsRichComparison, have a ...T variation which allows for generics bound by that comparison type. There was not one for SupportsAllComparisons, so this patch simply adds one to obviate the need for users to do the same.

I have named this TypeVar in the style of all the others (namely SupportsAllComparisonsT); however, I wonder if this should in fact be given a more general name such as the Java-style Comparable and ComparableT? That it's nonobvious (to me, at least, ymmv) which SupportsXXX protocol to use is slightly unfortunate and having one named such that This Is Meant To Be The One To Use might go a ways to improving this. If you feel differently, that's fine too (I can qualify the import to call it whatever I please, after all; it's mostly a discoverability issue for me.)

Thanks!

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