GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Typeclasses with several methods · Issue #83 · dry-python/classes Open Labels enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed DescriptionThere's a common use-case when we need to create a type-class with several methods. Like: class Functor(Protocol[T]): def map(self, function: Callable[[T], Functor[V]]) -> Functor[V]: ... @classmethod def from_value(cls, inner_value: V) -> Functor[V]: ... Currently, there's no way we can do that. I propose something like this: @typeclass class Functor(Protocol[T]): def map(self, function: Callable[[T], Functor[V]]) -> Functor[V]: ... @classmethod def from_value(cls, inner_value: V) -> Functor[V]: ... I am not sure how to bound it to the actual implementation. Activity
MetadataMetadataAssigneesLabelsenhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |