New API: `in_stdlib_namespace`
enhancement
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
0 条评论