mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
[3.14] gh-136516: Mention installation artifacts as de-facto resources (GH-136419) (#137038)
gh-136516: Mention installation artifacts as de-facto resources (GH-136419)
Files like NUL on windows are, from `importlib.resources` point of
view, an artifact caused by installing to a filesystem directory.
Mention these.
(cherry picked from commit fac4964fdb)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
This commit is contained in:
parent
33340233d0
commit
7b203aa2ff
1 changed files with 6 additions and 5 deletions
|
|
@ -16,11 +16,12 @@ within *packages*.
|
||||||
"Resources" are file-like resources associated with a module or package in
|
"Resources" are file-like resources associated with a module or package in
|
||||||
Python. The resources may be contained directly in a package, within a
|
Python. The resources may be contained directly in a package, within a
|
||||||
subdirectory contained in that package, or adjacent to modules outside a
|
subdirectory contained in that package, or adjacent to modules outside a
|
||||||
package. Resources may be text or binary. As a result, Python module sources
|
package. Resources may be text or binary. As a result, a package's Python
|
||||||
(.py) of a package and compilation artifacts (pycache) are technically
|
module sources (.py), compilation artifacts (pycache), and installation
|
||||||
de-facto resources of that package. In practice, however, resources are
|
artifacts (like :func:`reserved filenames <os.path.isreserved>`
|
||||||
primarily those non-Python artifacts exposed specifically by the package
|
in directories) are technically de-facto resources of that package.
|
||||||
author.
|
In practice, however, resources are primarily those non-Python artifacts
|
||||||
|
exposed specifically by the package author.
|
||||||
|
|
||||||
Resources can be opened or read in either binary or text mode.
|
Resources can be opened or read in either binary or text mode.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue