bpo-37574: Mention helper functions for find_spec documentation (GH-14739)

(cherry picked from commit 9cbb97b29e)

Co-authored-by: jdkandersson <51036209+jdkandersson@users.noreply.github.com>
This commit is contained in:
Miss Islington (bot) 2019-09-10 10:13:55 -07:00 committed by GitHub
parent 78c3949407
commit 63909cdc2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -274,6 +274,8 @@ ABC hierarchy::
parent package. If a spec cannot be found, ``None`` is returned. parent package. If a spec cannot be found, ``None`` is returned.
When passed in, ``target`` is a module object that the finder may When passed in, ``target`` is a module object that the finder may
use to make a more educated guess about what spec to return. use to make a more educated guess about what spec to return.
:func:`importlib.util.spec_from_loader` may be useful for implementing
concrete ``MetaPathFinders``.
.. versionadded:: 3.4 .. versionadded:: 3.4
@ -323,7 +325,8 @@ ABC hierarchy::
within the :term:`path entry` to which it is assigned. If a spec within the :term:`path entry` to which it is assigned. If a spec
cannot be found, ``None`` is returned. When passed in, ``target`` cannot be found, ``None`` is returned. When passed in, ``target``
is a module object that the finder may use to make a more educated is a module object that the finder may use to make a more educated
guess about what spec to return. guess about what spec to return. :func:`importlib.util.spec_from_loader`
may be useful for implementing concrete ``PathEntryFinders``.
.. versionadded:: 3.4 .. versionadded:: 3.4