Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Removed useless code from an earlier version.
  • Loading branch information
tim-one committed May 4, 2020
commit 86d1d0d817168d54ecec08cffec3b9b5eb092982
5 changes: 1 addition & 4 deletions Lib/fnmatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,10 @@ def translate(pat):
res = []
add = res.append
i, n = 0, len(inp)
# Fixed piece at the start?
fixed = []
# Fixed pieces at the start?
while i < n and inp[i] is not STAR:
add(inp[i])
i += 1
if fixed:
add("".join(fixed))
# Now deal with STAR fixed STAR fixed ...
# For an interior `STAR fixed` pairing, we want to do a minimal
# .*? match followed by `fixed`, with no possibility of backtracking.
Expand Down