-
-
Notifications
You must be signed in to change notification settings - Fork 34.5k
Refactor - remove re._compile? #122358
Copy link
Copy link
Open
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-regextype-featureA feature request or enhancementA feature request or enhancement
Metadata
Metadata
Assignees
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-regextype-featureA feature request or enhancementA feature request or enhancement
Feature or enhancement
Proposal:
Here is
re.compile:It just calls
re._compilewith the same arguments.When it was introduced it looked like there was some benefit to having an "implementation hook" to swap in impl from
sre_compile.py.I think the benefit doesn't really exist anymore - it seems like there should be a slight performance improvement, and simpler tracebacks, to just move the body of
_compiledirectly intocompile.Linked PRs