diff options
Diffstat (limited to 'Lib/pydoc.py')
-rwxr-xr-x | Lib/pydoc.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/pydoc.py b/Lib/pydoc.py index c79ec77..0a693f4 100755 --- a/Lib/pydoc.py +++ b/Lib/pydoc.py @@ -686,9 +686,7 @@ class HTMLDoc(Doc): r'RFC[- ]?(\d+)|' r'PEP[- ]?(\d+)|' r'(self\.)?(\w+))') - while True: - match = pattern.search(text, here) - if not match: break + while match := pattern.search(text, here): start, end = match.span() results.append(escape(text[here:start])) |