GH-72904: Simplify implementation of `fnmatch.translate()` by barneygale · Pull Request #109879 · python/cpython · GitHub
Skip to content

GH-72904: Simplify implementation of fnmatch.translate()#109879

Closed
barneygale wants to merge 2 commits intopython:mainfrom
barneygale:gh-72904-prep-fnmatch
Closed

GH-72904: Simplify implementation of fnmatch.translate()#109879
barneygale wants to merge 2 commits intopython:mainfrom
barneygale:gh-72904-prep-fnmatch

Conversation

@barneygale
Copy link
Copy Markdown
Contributor

@barneygale barneygale commented Sep 26, 2023

Use re to scan shell-style patterns, rather than parsing them by hand in a fat loop. This makes the code twice as slow (!) but arguably more obvious

Use `re.Scanner` to scan shell-style patterns, rather than parsing them
by hand in a fat loop. This makes the code slower (!) but more obvious, and
lays some groundwork for a future `glob.translate()` function.
@barneygale barneygale marked this pull request as ready for review September 26, 2023 02:22
@barneygale barneygale requested a review from jaraco September 26, 2023 02:22
@AA-Turner
Copy link
Copy Markdown
Member

@barneygale
Copy link
Copy Markdown
Contributor Author

@barneygale barneygale closed this Oct 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants