Skip to content
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

Suggestion: Add methods or parameters to filter the list #42

Open
GadgetSteve opened this issue Dec 3, 2020 · 0 comments
Open

Suggestion: Add methods or parameters to filter the list #42

GadgetSteve opened this issue Dec 3, 2020 · 0 comments

Comments

@GadgetSteve
Copy link

Specifically there are a lot of test. members to the standard library that people probably don't need most of the time, (e.g. when deciding which libraries to include in an executable). I think that it also might be handy to be able to get a list of just the top level libraries.

Taking python 3.8-64 as a test case:

from stdlib_list import stdlib_list
sl = stdlib_list('3.8')
print(len(sl))  # 1766
no_test = [l for l in sl if not l.startswith('test.') and not l == 'test']
print(len(no_test))  # 1062
top_level = {l.split('.')[0] for l in sl}
print(len(top_level))  # 310

I think that it would be great to either have functions or flags on stdlib_list to return the no_test & top_level filtered lists above, (which could possibly be produced more efficiently).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants