You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
I'm not aware of any great reason for calling it Function. Before mypy switched to a Python-compatible syntax it used func<...> for callable types, and Function is derived from the old syntax. I'm fine with changing the name to Callable unless somebody convincingly argues for keeping the current naming.
The thing that matches
collections.abc.Sequence
is calledSequence
, while the thing that matches the concrete typetuple
is calledTuple
. And the same goes for almost every type intyping.py
.The one exception is that the thing that matches
collections.abc.Callable
is calledFunction
, even though it matches methods, objects with__call__
methods, builtins, etc., not just functions. Why isn't this calledCallable
, whileFunction
is the generic version oftypes.FunctionType
?The text was updated successfully, but these errors were encountered: