Skip to content

Commit 4dc21f0

Browse files
gvanrossumJelleZijlstra
authored andcommitted
Move Sized earlier in the bases of Sequence (#2602)
See rominf/ordered-set-stubs#1: class OrderedSet(MutableSet[T], Sequence[T]): ... works in Python 3, but not in Python 2 -- this fixes that
1 parent 5d85326 commit 4dc21f0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stdlib/2/typing.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ class Container(Protocol[_T_co]):
144144
@abstractmethod
145145
def __contains__(self, x: object) -> bool: ...
146146

147-
class Sequence(Iterable[_T_co], Container[_T_co], Sized, Reversible[_T_co], Generic[_T_co]):
147+
class Sequence(Sized, Iterable[_T_co], Container[_T_co], Reversible[_T_co], Generic[_T_co]):
148148
@overload
149149
@abstractmethod
150150
def __getitem__(self, i: int) -> _T_co: ...

0 commit comments

Comments
 (0)