[Python-checkins] bpo-37574: Mention helper functions for find_spec documentation (GH-14739)

Miss Islington (bot) webhook-mailer at python.org
Tue Sep 10 13:16:07 EDT 2019


https://github.com/python/cpython/commit/e0a1561f93545f38034d6c48f21e79acfd4db04b
commit: e0a1561f93545f38034d6c48f21e79acfd4db04b
branch: 3.7
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2019年09月10日T10:16:03-07:00
summary:
bpo-37574: Mention helper functions for find_spec documentation (GH-14739)
(cherry picked from commit 9cbb97b29eac4b23e916a3233f26b60ac69e335b)
Co-authored-by: jdkandersson <51036209+jdkandersson at users.noreply.github.com>
files:
M Doc/library/importlib.rst
diff --git a/Doc/library/importlib.rst b/Doc/library/importlib.rst
index df184b33d0e7..974dbb461a15 100644
--- a/Doc/library/importlib.rst
+++ b/Doc/library/importlib.rst
@@ -274,6 +274,8 @@ ABC hierarchy::
 parent package. If a spec cannot be found, ``None`` is returned.
 When passed in, ``target`` is a module object that the finder may
 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
 
@@ -323,7 +325,8 @@ ABC hierarchy::
 within the :term:`path entry` to which it is assigned. If a spec
 cannot be found, ``None`` is returned. When passed in, ``target``
 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
 


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /