Skip to content

Commit 3300fc2

Browse files
committed
Rewrite section using imperative voice and add determiners.
1 parent ae996ba commit 3300fc2

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

docs/using.rst

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -119,27 +119,26 @@ imported. Thus the above example could also be written as::
119119
File system or zip file
120120
=======================
121121

122-
In general you never have to worry whether your package is on the file system
123-
or in a zip file, as the ``importlib_resources`` APIs hide those details from
124-
you. Sometimes though, you need a path to an actual file on the file system.
122+
A consumer need not worry whether any given package is on the file system
123+
or in a zip file, as the ``importlib_resources`` APIs abstracts those details.
124+
Sometimes though, the user needs a path to an actual file on the file system.
125125
For example, some SSL APIs require a certificate file to be specified by a
126126
real file system path, and C's ``dlopen()`` function also requires a real file
127127
system path.
128128

129-
To support this, ``importlib_resources`` provides an API that will extract the
130-
resource from a zip file to a temporary file, and return the file system path
131-
to this temporary file as a :py:class:`pathlib.Path` object. In order to
132-
properly clean up this temporary file, what's actually returned is a context
133-
manager that you can use in a ``with``-statement::
129+
To support this need, ``importlib_resources`` provides an API to extract the
130+
resource from a zip file to a temporary file or folder and return the file
131+
system path to this materialized resource as a :py:class:`pathlib.Path`
132+
object. In order to properly clean up this temporary file, what's actually
133+
returned is a context manager for use in a ``with``-statement::
134134

135135
from importlib_resources import files, as_file
136136

137137
source = files(email.tests.data).joinpath('message.eml')
138138
with as_file(source) as eml:
139139
third_party_api_requiring_file_system_path(eml)
140140

141-
You can use all the standard :py:mod:`contextlib` APIs to manage this context
142-
manager.
141+
Use all the standard :py:mod:`contextlib` APIs to manage this context manager.
143142

144143
.. attention::
145144

0 commit comments

Comments
 (0)