镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

How is this different from functools.singledispatch? #3

Closed

Description

@alexmojaki

This seems very similar to https://docs.python.org/3/library/functools.html#functools.singledispatch

Am I missing something?

Activity

  1. thejohnfreeman commented on Jul 4, 2019

    @thejohnfreeman
    Owner

    Indeed, this point has been brought up on Twitter and Reddit. The major differences are:

    1. You can put the type parameter anywhere in the argument list, not just the first position.
    2. You can define overloads for protocols (structural types) in addition to types.

    I'll see about adding a Related Work section to the README.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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