Skip to content

How important is the @_dispatchable decorator in networkx? #14462

@hamdanal

Description

@hamdanal

Can this decorator be removed?

One obvious advantage for having it is to mirror runtime. It has some disadvantages though:

  1. I can't for the life of me find a way to use it on overloaded functions. Indeed looking at the stubs, overloaded functions are stripped of this decorator
  2. VS Code with Pylance does not show the documentation of the function on hover only when the decorator is used

I find the overload case very important that it outweighs the benefits of matching runtime. I also think the editor hover issue compelling on its own but one could argue that this should be discussed with the Pylance team instead.

I wonder if we could just get rid of the decorator altogether. Am I missing other reasons for having the decorator?

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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy