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

New API: in_stdlib_namespace #120

Open
woodruffw opened this issue Apr 30, 2024 · 0 comments
Open

New API: in_stdlib_namespace #120

woodruffw opened this issue Apr 30, 2024 · 0 comments
Assignees

Comments

@woodruffw
Copy link
Member

Following discussion in #119: we should add a new API, in_stdlib_namespace, that behaves like in_stdlib except that it (1) does not check that the identifier actually exists, and (2) therefore does not require the identifier to be a "true" module. This API will be useful to consumers who just need to answer questions like "does this path fall under a stdlib namespace?" without knowing whether their path's "leaf" is a module or not.

As part of this, we should also update the in_stdlib docstring to emphasize that it checks whether the given path is importable.

CC @miketheman

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

1 participant