choose_single works
This commit is contained in:
parent
c4079efc4b
commit
8c01ee4198
@ -8,6 +8,9 @@ def search_pages():
|
||||
|
||||
print()
|
||||
print(search)
|
||||
|
||||
search.choose(1)
|
||||
print(search)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
@ -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