mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
In completer(), return None instead of raising an IndexError when
there are no more completions left. (This for compatibility with Donald Beaudry's code.)
This commit is contained in:
@@ -58,7 +58,10 @@ class Completer:
|
||||
self.matches = self.attr_matches(text)
|
||||
else:
|
||||
self.matches = self.global_matches(text)
|
||||
return self.matches[state]
|
||||
try:
|
||||
return self.matches[state]
|
||||
except IndexError:
|
||||
return None
|
||||
|
||||
def global_matches(self, text):
|
||||
"""Compute matches when text is a simple name.
|
||||
|
||||
Reference in New Issue
Block a user