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

PEP 677: Runtime Behavior Specification #2237

Merged
merged 10 commits into from
Jan 18, 2022
6 changes: 3 additions & 3 deletions pep-0677.rst
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@ Our plan is to expose a structured API as if they were defined as follows::

class CallableType:
is_async: bool
arguments: Ellipses | CallableArgumentsList | CallableConcatenation
arguments: builtins.Ellipses | CallableArgumentsList | CallableConcatenation
stroxler marked this conversation as resolved.
Show resolved Hide resolved
return_type:: Typing.type
stroxler marked this conversation as resolved.
Show resolved Hide resolved

class CallableArgumentsList:
Expand All @@ -666,7 +666,7 @@ Our plan is to expose a structured API as if they were defined as follows::

The evaluation model is that:

- ``AnyArguments`` evaluates to ``Ellipses``.
- ``AnyArguments`` evaluates to ``builtins.Ellipsis``.
- ``ArgumentsList`` evaluates to ``CallableArgumentsList``.
- ``Concatenation`` evaluates to ``CallableConcatenation``.
- To evaluate a ``CallableType`` or ``AsyncCallableType`` to a
Expand Down Expand Up @@ -1089,7 +1089,7 @@ Using a flat API
~~~~~~~~~~~~~~~~

Our runtime API mirrors the AST in that we distinguish the case
where the arguments is ``Ellipses`` versus ``CallableArgumentsList``
where the arguments is ``Ellipsis`` versus ``CallableArgumentsList``
versus ``CallableConcatenation``.

An alternative would be just have a single ``types.CallableType`` with
Expand Down