Skip to content

Commit 6cc951a

Browse files
Update dynamic_programming/fibonacci.py
Co-authored-by: Bertrand Awenze <[email protected]>
1 parent 74826f0 commit 6cc951a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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)