Skip to content

Commit fac4964

Browse files
authored
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.
1 parent 99cdf1d commit fac4964

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Doc/library/importlib.resources.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,12 @@ within *packages*.
1616
"Resources" are file-like resources associated with a module or package in
1717
Python. The resources may be contained directly in a package, within a
1818
subdirectory contained in that package, or adjacent to modules outside a
19-
package. Resources may be text or binary. As a result, Python module sources
20-
(.py) of a package and compilation artifacts (pycache) are technically
21-
de-facto resources of that package. In practice, however, resources are
22-
primarily those non-Python artifacts exposed specifically by the package
23-
author.
19+
package. Resources may be text or binary. As a result, a package's Python
20+
module sources (.py), compilation artifacts (pycache), and installation
21+
artifacts (like :func:`reserved filenames <os.path.isreserved>`
22+
in directories) are technically de-facto resources of that package.
23+
In practice, however, resources are primarily those non-Python artifacts
24+
exposed specifically by the package author.
2425

2526
Resources can be opened or read in either binary or text mode.
2627

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy