summaryrefslogtreecommitdiffstats
path: root/Lib/pydoc.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/pydoc.py')
-rwxr-xr-xLib/pydoc.py4
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]))