Skip to content

New method in_stdlib (Fixes issue #21) #23

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 26, 2019
Merged

Conversation

smarie
Copy link

@smarie smarie commented Sep 3, 2019

New method in_stdlib to efficiently check if a module name is part of std lib.
It relies on functools' @lru_cache to cache the stdlib list and query results for similar calls.
Therefore it is much more efficient than module_name in stdlib_list() especially if you wish to perform multiple checks.

Fixes #21

Sylvain MARIE added 3 commits September 3, 2019 11:16
…of std lib.

It relies on functools' `@lru_cache` to cache the stdlib list and query results for similar calls.
Therefore it is much more efficient than `module_name in stdlib_list()` especially if you wish to perform multiple checks.
@ocefpaf
Copy link
Contributor

ocefpaf commented Sep 3, 2019

Looks good to me. Let's wait for a second opinion before we merge it. Thanks!

@ocefpaf ocefpaf requested a review from ericdill September 3, 2019 15:10
@ocefpaf ocefpaf merged commit 8faa86f into pypi:master Nov 26, 2019
@smarie smarie deleted the fix_issue_21 branch November 26, 2019 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

is_builtin_module(module_name)
2 participants