Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 55803bc

Browse files
committed
Describe __path__ along with the rest of the package description.
Closes SF bug #626554.
1 parent d6cf8be commit 55803bc

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

Doc/tut/tut.tex

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2672,7 +2672,7 @@ \subsection{Importing * From a Package \label{pkg-import-star}}
26722672
\module{Sound.Effects} package when the \code{from...import} statement
26732673
is executed. (This also works when \code{__all__} is defined.)
26742674

2675-
Note that in general the practicing of importing * from a module or
2675+
Note that in general the practice of importing \code{*} from a module or
26762676
package is frowned upon, since it often causes poorly readable code.
26772677
However, it is okay to use it to save typing in interactive sessions,
26782678
and certain modules are designed to export only names that follow
@@ -2713,6 +2713,17 @@ \subsection{Intra-package References}
27132713
%because of its awkwardness; since most packages will have a relative
27142714
%shallow substructure, this is no big loss.)
27152715

2716+
\subsection{Packages in Multiple Directories}
2717+
2718+
Packages support one more special attribute, \member{__path__}. This
2719+
is initialized to be a list containing the name of the directory
2720+
holding the package's \file{__init__.py} before the code in that file
2721+
is executed. This variable can be modified; doing so affects future
2722+
searches for modules and subpackages contained in the package.
2723+
2724+
While this feature is not often needed, it can be used to extend the
2725+
set of modules found in a package.
2726+
27162727

27172728

27182729
\chapter{Input and Output \label{io}}

0 commit comments

Comments
 (0)