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

singledispatch docs should explicitly mention support for abstract base classes #65966

Closed
ncoghlan opened this issue Jun 15, 2014 · 2 comments
Closed
Labels
stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@ncoghlan
Copy link
Contributor

BPO 21767
Nosy @ncoghlan, @ambv, @vadmium
PRs
  • bpo-21767: explicitly mention abc support in functools.singledispatch #17171
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2019-11-19.08:17:31.554>
    created_at = <Date 2014-06-15.04:00:26.357>
    labels = ['type-feature', 'library']
    title = 'singledispatch docs should explicitly mention support for abstract base classes'
    updated_at = <Date 2019-11-19.08:17:31.553>
    user = 'https://github.com/ncoghlan'

    bugs.python.org fields:

    activity = <Date 2019-11-19.08:17:31.553>
    actor = 'lukasz.langa'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-11-19.08:17:31.554>
    closer = 'lukasz.langa'
    components = ['Library (Lib)']
    creation = <Date 2014-06-15.04:00:26.357>
    creator = 'ncoghlan'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 21767
    keywords = ['patch']
    message_count = 2.0
    messages = ['220611', '356953']
    nosy_count = 3.0
    nosy_names = ['ncoghlan', 'lukasz.langa', 'martin.panter']
    pr_nums = ['17171']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue21767'
    versions = ['Python 3.4', 'Python 3.5']

    @ncoghlan
    Copy link
    Contributor Author

    functools.singledispatch is integrated with the abc module for fast single dispatch even in the absence of concrete inheritance. However, this isn't obvious from the documentation, so users may not realise they can register a single ABC with the generic function, and then multiple classes with the ABC, rather than having to register each class with the generic function directly.

    @ncoghlan ncoghlan added stdlib Python modules in the Lib dir type-feature A feature request or enhancement labels Jun 15, 2014
    @ambv
    Copy link
    Contributor

    ambv commented Nov 19, 2019

    New changeset 24555ce by Łukasz Langa (Batuhan Taşkaya) in branch 'master':
    bpo-21767: explicitly mention abc support in functools.singledispatch docs (bpo-17171)
    24555ce

    @ambv ambv closed this as completed Nov 19, 2019
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants