mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-04-15 02:07:36 +00:00
Trying to solve pre-commit error of type overload
This commit is contained in:
parent
f9ddbfb15b
commit
7427a23e94
@ -78,6 +78,11 @@ class DynamicArray:
|
|||||||
if index < 0 or index >= self.size:
|
if index < 0 or index >= self.size:
|
||||||
raise IndexError("index out of range")
|
raise IndexError("index out of range")
|
||||||
return self.array[index]
|
return self.array[index]
|
||||||
|
|
||||||
|
def __setitem__(self, index: int, value: int) -> None:
|
||||||
|
if index < 0 or index >= self.size:
|
||||||
|
raise IndexError("index out of range")
|
||||||
|
self.array[index] = value
|
||||||
|
|
||||||
def __len__(self) -> int:
|
def __len__(self) -> int:
|
||||||
"""
|
"""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user