@@ -186,14 +186,14 @@ objects, they have a type, they can be passed as function arguments, they may
186
186
have methods and properties. In this understanding, Python is an
187
187
object-oriented language.
188
188
189
- However, unlike Java, Python do not impose object-oriented programming as the
189
+ However, unlike Java, Python does not impose object-oriented programming as the
190
190
main programming paradigm. It is perfectly viable for a Python project to not
191
191
be object-oriented, i.e. to use no or very few class definitions, class
192
192
inheritance, or any other mechanisms that are specific to object-oriented
193
193
programming.
194
194
195
195
Moreover, as seen in the modules _ section, the way Python handles modules and
196
- namespaces gives the developer a natural way to ensure
196
+ namespaces gives the developer a natural way to ensure the
197
197
encapsulation and separation of abstraction layers, both being the most common
198
198
reasons to use object-orientation. Therefore, Python programmers have more
199
199
latitude to not use object-orientation, when it is not required by the business
@@ -208,8 +208,8 @@ In some architectures, typically web applications, multiple instances of Python
208
208
processes are spawned to respond to external requests that can
209
209
happen at the same time. In this case, holding some state into instantiated
210
210
objects, which means keeping some static information about the world, is prone
211
- to concurrency problems or race-conditions. Sometime between the initialization of the
212
- state of an object, usually done with the __init__() method, and the actual use
211
+ to concurrency problems or race-conditions. Sometimes, between the initialization of
212
+ the state of an object ( usually done with the __init__() method) and the actual use
213
213
of the object state through one of its methods, the world may have changed, and
214
214
the retained state may be outdated. For example, a request may load an item in
215
215
memory and mark it as read by a user. If another request requires the deletion
@@ -257,7 +257,7 @@ The Python language provides a simple yet powerful syntax called 'decorators'.
257
257
A decorator is a function or a class that wraps (or decorate) a function
258
258
or a method. The 'decorated' function or method will replace the original
259
259
'undecorated' function or method. Because functions are first-class objects
260
- in Python it can be done 'manually' but using the @decorator syntax is
260
+ in Python, it can be done 'manually', but using the @decorator syntax is
261
261
clearer and thus preferred.
262
262
263
263
.. code-block :: python
0 commit comments