You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/writing/style.rst
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -117,8 +117,8 @@ follow the syntax that is the closest to the function definition: ``send('Hello'
117
117
'World', cc='Cthulhu', bcc='God')``.
118
118
119
119
As a side note, following `YAGNI <http://en.wikipedia.org/wiki/You_ain't_gonna_need_it>`_
120
-
principle, it is often harder to remove an optional argument (and its logic inside the
121
-
function) that was added "just in case" and is seemingly never used, than to add a
120
+
principle, it is often harder to remove an optional argument (and its logic inside the
121
+
function) that was added "just in case" and is seemingly never used, than to add a
122
122
new optional argument and its logic when needed.
123
123
124
124
3. The **arbitrary argument list** is the third way to pass arguments to a
@@ -256,14 +256,14 @@ are a probable indication that such a refactoring is needed.
256
256
Idioms
257
257
------
258
258
259
-
A programming idiom, put simply, is a *way* to write code. The notion of programming idioms
259
+
A programming idiom, put simply, is a *way* to write code. The notion of programming idioms
260
260
is discussed amply at `c2 <http://c2.com/cgi/wiki?ProgrammingIdiom>`_ and at `Stack Overflow <http://stackoverflow.com/questions/302459/what-is-a-programming-idiom>`_.
261
261
262
-
Idiomatic Python code is often referred to as being *Pythonic*.
262
+
Idiomatic Python code is often referred to as being *Pythonic*.
263
263
264
-
Although there usually is one-- and preferably only one --obvious way to do it;
264
+
Although there usually is one-- and preferably only one --obvious way to do it;
265
265
*the* way to write idiomatic Python code can be non-obvious to Python beginners. So,
266
-
good idioms must be consciously acquired.
266
+
good idioms must be consciously acquired.
267
267
268
268
Some common Python idioms follow:
269
269
@@ -362,7 +362,7 @@ For more information see this `StackOverflow <http://stackoverflow.com/questions
362
362
Zen of Python
363
363
-------------
364
364
365
-
Also known as PEP 20, the guiding principles for Python's design.
365
+
Also known as :pep:`20`, the guiding principles for Python's design.
366
366
367
367
::
368
368
@@ -399,7 +399,7 @@ PEP 8
399
399
400
400
PEP 8 is the de-facto code style guide for Python.
0 commit comments