stdlib-list icon indicating copy to clipboard operation
stdlib-list copied to clipboard

New API: `in_stdlib_namespace`

Open woodruffw opened this issue 1 year ago • 0 comments

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

woodruffw avatar Apr 30 '24 14:04 woodruffw