GH-72904: Simplify implementation of `fnmatch.translate()` by barneygale · Pull Request #109879 · python/cpython
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.
Bot
mentioned this pull request
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters