diff options
| author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2023-04-23 08:57:10 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-23 08:57:10 (GMT) |
| commit | a43dbe13e2827464afe06e4b73f461003de28d79 (patch) | |
| tree | 7aded2297a0aed8a49b3f74aca3d5db227613b31 /Lib/pkgutil.py | |
| parent | 050b6b34d055fc034ac86a1cfc8c5c7d3f98b2e5 (diff) | |
| download | cpython-a43dbe13e2827464afe06e4b73f461003de28d79.zip cpython-a43dbe13e2827464afe06e4b73f461003de28d79.tar.gz cpython-a43dbe13e2827464afe06e4b73f461003de28d79.tar.bz2 | |
[3.11] gh-68654: Clarify subdirectories used by pkgutil.extend_path (GH-103701)
gh-68654: Clarify subdirectories used by pkgutil.extend_path (GH-103701)
Clarify sub directories used by pkgutil.extend_path in the docs and the docstring
(cherry picked from commit 7bf94568a9a4101c72b8bf555a811028e5b45ced)
Co-authored-by: Randy <69558016+san-juan1667@users.noreply.github.com>
Diffstat (limited to 'Lib/pkgutil.py')
| -rw-r--r-- | Lib/pkgutil.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/pkgutil.py b/Lib/pkgutil.py index bdebfd2..56731de 100644 --- a/Lib/pkgutil.py +++ b/Lib/pkgutil.py @@ -511,10 +511,10 @@ def extend_path(path, name): from pkgutil import extend_path __path__ = extend_path(__path__, __name__) - This will add to the package's __path__ all subdirectories of - directories on sys.path named after the package. This is useful - if one wants to distribute different parts of a single logical - package as multiple directories. + For each directory on sys.path that has a subdirectory that + matches the package name, add the subdirectory to the package's + __path__. This is useful if one wants to distribute different + parts of a single logical package as multiple directories. It also looks for *.pkg files beginning where * matches the name argument. This feature is similar to *.pth files (see site.py), |
