| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
This is used only by ast.get_source_segment(), so it seems sensible to avoid importing it.
|
How much does this speedup the import of inspect? I wouldn't expect it to do much on its own, since inspect itself also imports re. Or is the idea that this could be done in combination with some of the changes in #119526? |
Sorry, something went wrong.
|
(Though it's probably worth doing even if it just speeds up the import of ast. I guess I was looking at it through the lens of the github issue it was attached to.) |
Sorry, something went wrong.
There was a problem hiding this comment.
Locally for me this cuts about 20% off the import time for ast (0.0036s -> 0.0029s), so this seems worth doing. This is especially true since the _splitlines_no_ff function is only ever used in get_source_segment, which is one of the lesser-used ast-module APIs
Sorry, something went wrong.
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This is used only by ast.get_source_segment(), so it seems sensible to avoid importing it. Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
| Back | FazBrowse Home | New Git URL |
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.