choose_single works
This commit is contained in:
parent
c4079efc4b
commit
8c01ee4198
@ -9,6 +9,9 @@ def search_pages():
|
||||
print()
|
||||
print(search)
|
||||
|
||||
search.choose(1)
|
||||
print(search)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
search_pages()
|
||||
|
@ -53,10 +53,10 @@ class MultiPageOptions:
|
||||
if option_len > self.max_displayed_options:
|
||||
option_len = self.max_displayed_options
|
||||
|
||||
if index < j + option_len:
|
||||
return options[j + option_len - 1], Page
|
||||
if j <= index < j + option_len:
|
||||
return options[j + option_len - 1], page
|
||||
|
||||
j += option_len - 1
|
||||
j += option_len
|
||||
|
||||
raise KeyError("index is out of range")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user