Skip to content

Commit 7a69343

Browse files
committed
had codex proofread
1 parent bf57229 commit 7a69343

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

peps/pep-0800.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ Similarly, the concept of a "disjoint base" is not meaningful on ``TypedDict`` d
261261
Although they receive some special treatment in the type system, ``NamedTuple`` definitions create real nominal classes that can
262262
have child classes, so it makes sense to allow ``@disjoint_base`` on them and treat them like regular classes for the purposes
263263
of the disjoint base mechanism. All ``NamedTuple`` classes have ``tuple``, a disjoint base, in their MRO, so they
264-
cannot multiple inherit from other disjoint bases.
264+
cannot use multiple inheritance with other disjoint bases.
265265

266266
Specification
267267
=============
@@ -472,9 +472,9 @@ Nevertheless, it accepts the following class definition without error::
472472
def __rmul__(self, other: object) -> Never:
473473
raise TypeError
474474
def __ge__(self, other: int | str) -> bool:
475-
return int(self) > other if isinstance(other, int) else str(self) > other
476-
def __gt__(self, other: int | str) -> bool:
477475
return int(self) >= other if isinstance(other, int) else str(self) >= other
476+
def __gt__(self, other: int | str) -> bool:
477+
return int(self) > other if isinstance(other, int) else str(self) > other
478478
def __lt__(self, other: int | str) -> bool:
479479
return int(self) < other if isinstance(other, int) else str(self) < other
480480
def __le__(self, other: int | str) -> bool:
@@ -526,7 +526,7 @@ can also reject classes that have more practically useful implementations::
526526
pass
527527

528528
Mypy's rule works reasonably well in practice for deducing whether an intersection of two
529-
classes is inhabited. Most builtin classes that are disjoint bases happen to implement common dunder
529+
classes is inhabited. Most built-in classes that are disjoint bases happen to implement common dunder
530530
methods such as ``__add__`` and ``__iter__`` in incompatible ways, so mypy will consider them
531531
incompatible. There are some exceptions: mypy allows ``class C(BaseException, int): ...``,
532532
though both of these classes are disjoint bases and the class definition is rejected at runtime.

0 commit comments

Comments
 (0)