--- a/eric6/QScintilla/Editor.py Sun Apr 11 12:38:16 2021 +0200 +++ b/eric6/QScintilla/Editor.py Sun Apr 11 16:53:48 2021 +0200 @@ -4942,11 +4942,7 @@ return False wseps = self.lexer_.autoCompletionWordSeparators() - for wsep in wseps: - if wsep.endswith(ch): - return True - - return False + return any(wsep.endswith(ch) for wsep in wseps) def __autocompletionCancelled(self): """