Skip to content

A possible syntax for a function type with a varargs argument list #540

Closed
@gvanrossum

Description

@gvanrossum

I just skimmed the README for Reticulated Python (https://github.com/mvitousek/reticulated). They have a useful hack to spell the type of a function with varargs or other dynamic hacks in the argument list: a normal function type is spelled e.g. Function([Int, Int], Float); a function type with a varargs argument list is spelled e.g. Function(DynParameters, Float). In mypy this would be Function[DynParameters, float]. (Or pick some other name for DynParameters.)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions