Add repr to the SequenceProxy

This commit is contained in:
Jakub Kuczys 2022-10-02 23:51:19 +02:00 committed by GitHub
parent c30a2f3ca0
commit dc34a8f1dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -224,6 +224,9 @@ class SequenceProxy(Sequence[T_co]):
self.__proxied = list(self.__proxied)
return self.__proxied
def __repr__(self) -> str:
return f"SequenceProxy({self.__proxied!r})"
def __getitem__(self, idx: int) -> T_co:
return self.__copied[idx]