Skip to content

Commit f7dffd6

Browse files
committed
Remove the optimization, as it has no effect.
1 parent c2418c1 commit f7dffd6

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

Lib/configparser.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -580,10 +580,6 @@ def value(self, string):
580580

581581
class _CommentSpec:
582582
def __init__(self, full_prefixes, inline_prefixes):
583-
if not full_prefixes and not inline_prefixes:
584-
# performance optimization when no prefixes (gh-128641)
585-
self.strip = lambda text: text
586-
return
587583
full_patterns = (
588584
# prefix at the beginning of a line
589585
fr'^({re.escape(prefix)}).*'

0 commit comments

Comments
 (0)