Skip to content

much simpler solution to extreme-self-casting #83

Closed
@asottile

Description

@asottile

this one felt a bit too easy -- I'm not sure how to change the problem to ...

spoilers
... require annotating [sic] `self`
from typing import *


class Fn[R, **P]:
    def __init__(self, f: Callable[P, R]):
        self.f = f

    def transform_callable(self) -> Callable[Concatenate[object, P], R]:
        ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions