Skip to content

Commit 2b8c1f2

Browse files
committed
minor rewording
1 parent 4a30dc9 commit 2b8c1f2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

docs/spec/narrowing.rst

+4-3
Original file line numberDiff line numberDiff line change
@@ -274,12 +274,13 @@ Because it is possible to attempt to narrow B,
274274
but A does not have appropriate information about B
275275
(or any other unknown subclass of A!) it's not possible to safely narrow
276276
in either direction. The general rule for generics is that if you do not know
277-
all the places a generic class is generic and do not enough of them to be
277+
all the places a generic class is generic and do not check enough of them to be
278278
absolutely certain, you cannot return True, and if you do not have a definitive
279279
counter example to the type to be narrowed to you cannot return False.
280280
In practice, if soundness is prioritized over an unsafe narrowing,
281-
not knowing what you don't know is solvable by erroring out
282-
or by making the class to be narrowed final to avoid such a situation.
281+
not knowing what you don't know is solvable by either
282+
erroring out when neither return option is safe, or by making the class to be
283+
narrowed final to avoid such a situation.
283284

284285
In practice, such correctness is not always neccessary, and may work against
285286
your needs. for example, if you trust that users implementing

0 commit comments

Comments
 (0)