Skip to content

Commit ea17616

Browse files
committed
Needs to be AnyOf and AllOf, add Matches
1 parent a076ec1 commit ea17616

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

pre-pep.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -467,14 +467,19 @@ Boolean operators
467467
literal type indicating whether ``T`` is a subtype of ``S``.
468468
To support runtime checking, we probably need something weaker.
469469

470+
TODO: Discuss this in detail.
471+
472+
* ``Matches[T, S]``:
473+
Equivalent to ``IsSub[T, S] and IsSub[S, T]``.
474+
470475
* ``Bool[T]``: Returns ``Literal[True]`` if ``T`` is also
471476
``Literal[True]`` or a union containing it.
472477
Equivalent to ``IsSub[T, Literal[True]] and not IsSub[T, Never]``.
473478

474-
* ``Any[*Ts]``: Returns ``Literal[True]`` if any of ``Ts`` are true
479+
* ``AnyOf[*Ts]``: Returns ``Literal[True]`` if any of ``Ts`` are true
475480
(by the rule given in ``Bool``) and ``Literal[False]`` otherwise.
476481

477-
* ``All[*Ts]``: Returns ``Literal[True]`` if all of ``Ts`` are true
482+
* ``AllOf[*Ts]``: Returns ``Literal[True]`` if all of ``Ts`` are true
478483
(by the rule given in ``Bool``) and ``Literal[False]`` otherwise.
479484

480485
Basic operators

0 commit comments

Comments
 (0)