Skip to content

Commit 75c73e9

Browse files
committed
Added comment.
1 parent caae3b5 commit 75c73e9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cmd2/pt_utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ def add_command(self, string: str) -> None:
176176
177177
Ensures consecutive duplicates are not stored.
178178
"""
179+
# self._loaded_strings is sorted newest to oldest, so we compare to the first element.
179180
if string and (not self._loaded_strings or self._loaded_strings[0] != string):
180181
super().append_string(string)
181182

0 commit comments

Comments
 (0)