Skip to content

Commit 13ceb2b

Browse files
authored
MAINT: Used f-string method
Updated the code with f-string methods wherever required for a better and cleaner understanding of the code.
1 parent e5d1ff2 commit 13ceb2b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

other/lru_cache.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ def __init__(self, key: T | None, val: U | None):
2121
self.prev: DoubleLinkedListNode[T, U] | None = None
2222

2323
def __repr__(self) -> str:
24-
return "Node: key: {}, val: {}, has next: {}, has prev: {}".format(
25-
self.key, self.val, self.next is not None, self.prev is not None
26-
)
24+
return f"Node: key: {self.key}, val: {self.val}, has next: {self.next is not None}, has prev: {self.prev is not None}"
2725

2826

2927
class DoubleLinkedList(Generic[T, U]):

0 commit comments

Comments
 (0)