@@ -53,7 +53,7 @@ One statement per line
5353
5454While some compound statements such as list comprehensions are
5555allowed and appreciated for their brevity and their expressiveness,
56- it is bad practice to have two disjoint statements on the same line.
56+ it is bad practice to have two disjoint statements on the same line of code .
5757
5858**Bad **
5959
@@ -86,7 +86,7 @@ Function arguments
8686
8787Arguments can be passed to functions in four different ways.
8888
89- **Positional arguments ** are mandatory and have no default values. They are the
89+ 1. **Positional arguments ** are mandatory and have no default values. They are the
9090simplest form of arguments and they can be used for the few function arguments
9191that are fully part of the functions meaning and their order is natural. For
9292instance, in ``send(message, recipient) `` or ``point(x, y) `` the user of the
@@ -99,7 +99,7 @@ and, doing so, it is possible to switch the order of arguments, calling for inst
9999reduces readability and is unnecessarily verbose, compared to the more straightforward
100100calls to ``send('Hello', 'World') `` and ``point(1, 2) ``.
101101
102- **Keyword arguments ** are not mandatory and have default values. They are often
102+ 2. **Keyword arguments ** are not mandatory and have default values. They are often
103103used for optional parameters sent to the function. When a function has more than
104104two or three positional parameters, its signature will be more difficult to remember
105105and using keyword argument with default values is helpful. For instance, a more
@@ -121,7 +121,7 @@ principle, it is often harder to remove an optional argument (and its logic insi
121121function) that was added "just in case" and is seemingly never used, than to add a
122122new optional argument and its logic when needed.
123123
124- The **arbitrary argument list ** is the third way to pass arguments to a
124+ 3. The **arbitrary argument list ** is the third way to pass arguments to a
125125function. If the function intention is better expressed by a signature with an
126126extensible number of positional arguments, it can be defined with the ``*args ``
127127constructs. In the function body, ``args `` will be a tuple of all the
@@ -139,7 +139,7 @@ it explicitly: ``send(message, recipients)`` and call it with ``send('Hello',
139139the recipient list as a list beforehand, and it opens the possibility to pass
140140any sequence, including iterators, that cannot be unpacked as other sequences.
141141
142- The **arbitrary keyword argument dictionary ** is the last way to pass arguments
142+ 4. The **arbitrary keyword argument dictionary ** is the last way to pass arguments
143143to functions. If the function requires an undetermined series of named
144144arguments, it is possible to use the ``**kwargs `` construct. In the function
145145body, ``kwargs `` will be a dictionary of all the passed named arguments that
@@ -166,9 +166,13 @@ Avoid the magical wand
166166
167167A powerful tool for hackers, Python comes with a very rich set of hooks and
168168tools allowing to do almost any kind of tricky tricks. For instance, it is
169- possible to change how objects are created and instantiated, it is possible to
170- change how the Python interpreter imports modules, it is even possible (and
171- recommended if needed) to embed C routines in Python.
169+ possible to do each of the following:
170+
171+ * change how objects are created and instantiated
172+
173+ * change how the Python interpreter imports modules
174+
175+ * it is even possible (and recommended if needed) to embed C routines in Python.
172176
173177However, all these options have many drawbacks and it is always better to use
174178the most straightforward way to achieve your goal. The main drawback is that
@@ -181,7 +185,7 @@ way. However, knowing how to use them and particularly when **not** to use
181185them is the most important.
182186
183187Like a Kungfu master, a Pythonista knows how to kill with a single finger, and
184- never to do it.
188+ never to actually do it.
185189
186190We are all consenting adults
187191~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0 commit comments