Skip to content

Commit 6cc951a

Browse files
Update dynamic_programming/fibonacci.py
Co-authored-by: Bertrand Awenze <156874668+bertrand-awz@users.noreply.github.com>
1 parent 74826f0 commit 6cc951a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

dynamic_programming/fibonacci.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ def get(self, index: int) -> list[int]:
9696
True
9797
"""
9898
if index < 0:
99-
raise ValueError(f"Index must be non-negative, got {index}")
99+
error_msg = f"Index must be non-negative, got {index}"
100+
raise ValueError(error_msg)
100101

101102
if index == 0:
102103
return []

0 commit comments

Comments
 (0)