Skip to content

Commit 864d441

Browse files
committed
Tweaks
1 parent 6697a5d commit 864d441

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

pep.rst

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,10 @@ Boolean operators
580580
'''''''''''''''''
581581

582582
* ``IsAssignable[T, S]``: Returns a boolean literal type indicating whether
583-
``S`` is assignable to ``T``.
583+
``T`` is assignable to ``S``.
584+
585+
(That is, it is a "consistent subtype". This is subtyping extended
586+
to gradual types.)
584587

585588
* ``IsEquivalent[T, S]``:
586589
Equivalent to ``IsAssignable[T, S] and IsAssignable[S, T]``.
@@ -1325,7 +1328,7 @@ like::
13251328
type definer = D
13261329

13271330
We considered this but rejected it due to runtime implementation
1328-
concerns: an expression like ``Member[Literal["x", int]].name`` would
1331+
concerns: an expression like ``Member[Literal["x"], int].name`` would
13291332
need to return an object that captures both the content of the type
13301333
alias while maintaining the ``_GenericAlias`` of the applied class so
13311334
that type variables may be substituted for.
@@ -1339,14 +1342,14 @@ We wouldn't be able to have the operation lift over unions or the like
13391342
(unless we were willing to modify ``__getattr__`` for
13401343
``types.UnionType`` and ``typing._UnionGenericAlias`` to do so!)
13411344

1342-
That just leave semantic and philosophical concerns: it arguably makes
1345+
That just leaves semantic and philosophical concerns: it arguably makes
13431346
the model more complicated, but a lot of code will read much nicer.
13441347

13451348
Another option would be to skip introducing a general mechanism (for
13461349
now, at least), but at least make dot notation work on ``Member``,
13471350
which will be extremely common.
13481351

1349-
With dot notation, ``PropsOnly`` (from
1352+
With dot notation, ``PropsOnly`` (from
13501353
:ref:`the query builder example <qb-impl>`) would look like::
13511354

13521355
type PropsOnly[T] = typing.NewProtocol[

0 commit comments

Comments
 (0)