Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
GH-72904: Simplify implementation offnmatch.translate()
#109879
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Use `re.Scanner` to scan shell-style patterns, rather than parsing themby hand in a fat loop. This makes the code slower (!) but more obvious, andlays some groundwork for a future `glob.translate()` function.
What are the benchmarks for this? (i.e. are we talking 10μs to 20μs or 250ms to 500ms?) The regression in performance here may not matter if the translation is a sufficiently small part of any reasonable usecase. @serhiy-storchaka has been working on A |
Withdrawing this PR - the performance isn't good enough. |
Uh oh!
There was an error while loading.Please reload this page.
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