Skip to content

Function is a misleading name for Callable #394

Closed
@abarnert

Description

@abarnert

The thing that matches collections.abc.Sequence is called Sequence, while the thing that matches the concrete type tuple is called Tuple. And the same goes for almost every type in typing.py.

The one exception is that the thing that matches collections.abc.Callable is called Function, even though it matches methods, objects with __call__ methods, builtins, etc., not just functions. Why isn't this called Callable, while Function is the generic version of types.FunctionType?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions