Skip to content

Commit 707628d

Browse files
committed
More writing/structure changes.
1 parent 404c258 commit 707628d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/writing/structure.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -183,13 +183,13 @@ gather all package-wide definitions.
183183

184184
A file :file:`modu.py` in the directory :file:`pack/` is imported with the statement ``import
185185
pack.modu``. This statement will look for an :file:`__init__.py` file in :file:`pack`, execute
186-
all of its top-level statements. Then it will look for a file :file:`pack/modu.py` and
186+
all of its top-level statements. Then it will look for a file named :file:`pack/modu.py` and
187187
execute all of its top-level statements. After these operations, any variable,
188188
function, or class defined in :file:`modu.py` is available in the pack.modu namespace.
189189

190190
A commonly seen issue is to add too much code to :file:`__init__.py`
191191
files. When the project complexity grows, there may be sub-packages and
192-
sub-sub-packages in a deep directory structure, and then, importing a single item
192+
sub-sub-packages in a deep directory structure. In this case, importing a single item
193193
from a sub-sub-package will require executing all :file:`__init__.py` files met while
194194
traversing the tree.
195195

@@ -207,7 +207,7 @@ Python is sometimes described as an object-oriented programming language. This
207207
can be somewhat misleading and needs to be clarified.
208208

209209
In Python, everything is an object, and can be handled as such. This is what is
210-
meant when we say that, for example, functions are first-class objects.
210+
meant when we say, for example, that functions are first-class objects.
211211
Functions, classes, strings, and even types are objects in Python: like any
212212
objects, they have a type, they can be passed as function arguments, they may
213213
have methods and properties. In this understanding, Python is an
@@ -284,7 +284,7 @@ The Python language provides a simple yet powerful syntax called 'decorators'.
284284
A decorator is a function or a class that wraps (or decorates) a function
285285
or a method. The 'decorated' function or method will replace the original
286286
'undecorated' function or method. Because functions are first-class objects
287-
in Python, it can be done 'manually', but using the @decorator syntax is
287+
in Python, this can be done 'manually', but using the @decorator syntax is
288288
clearer and thus preferred.
289289

290290
.. code-block:: python

0 commit comments

Comments
 (0)