FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-59110: Extract function for _add_implicit_dirs. by jaraco · Pull Request #121378 · python/cpython · GitHub

Repository navigation

gh-59110: Extract function for _add_implicit_dirs. - #121378

Closed
jaraco wants to merge 2 commits into
python:mainfrom
jaraco:refactor/zipimport-implied-dirs
Closed

jaraco wants to merge 2 commits into
python:mainfrom
jaraco:refactor/zipimport-implied-dirs

Conversation

jaraco commented Jul 4, 2024 •
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Member

Copy link
Copy Markdown
Member

I do not see benefits, Actually, this looks like pessimization. The current code stops adding implicit parent dirs if it found already added dir. Your code continues to generate them. For example, if there are foo/bar/baz/a.py, foo/bar/baz/b.py and foo/bar/baz/c.py, it will calculate foo/bar/ and foo/ three times. You need to use dict.fromkeys() to de-duplicate them.

jaraco closed this Jul 4, 2024
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
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


Back | FazBrowse Home | New Git URL