--- a/eric6/QScintilla/DocstringGenerator/PyDocstringGenerator.py Sun Apr 11 12:38:16 2021 +0200 +++ b/eric6/QScintilla/DocstringGenerator/PyDocstringGenerator.py Sun Apr 11 16:53:48 2021 +0200 @@ -481,11 +481,8 @@ @return flag indicating the position is in between @rtype bool """ - for posLeft, posRight in pairs: - if posLeft < posChar < posRight: - return True - - return False + return any(posLeft < posChar < posRight + for (posLeft, posRight) in pairs) def __findQuotePosition(self, text): """