@@ -38,8 +38,10 @@ Also known as PEP 20, the guiding principles for Python's design.
38
38
If the implementation is easy to explain, it may be a good idea.
39
39
Namespaces are one honking great idea -- let's do more of those!
40
40
41
- See `<http://stackoverflow.com/questions/228181/the-zen-of-python >`_ for some
42
- examples.
41
+ For some examples of good Python style, see `this Stack Overflow question
42
+ <http://stackoverflow.com/questions/228181/the-zen-of-python> `_ or `these
43
+ slides from a Python user group
44
+ <http://artifex.org/~hblanks/talks/2011/pep20_by_example.pdf> `_.
43
45
44
46
PEP 8
45
47
-----
@@ -48,16 +50,17 @@ PEP 8 is the de-facto code style guide for Python.
48
50
49
51
`PEP 8 <http://www.python.org/dev/peps/pep-0008/ >`_
50
52
51
- There exists a command-line program, `pep8 ` that can check your code for
52
- conformance.
53
+ Conforming your Python code to PEP 8 is generally a good idea and helps make
54
+ code more consistent when working on projects with other developers. There
55
+ exists a command-line program, `pep8 <https://github.com/jcrocholl/pep8 >`_,
56
+ that can check your code for conformance.
53
57
54
58
::
55
59
56
- pip install pep8
60
+ $ pip install pep8
57
61
58
62
59
- Simply run it on a file or series of files and get a report of any
60
- violations
63
+ Simply run it on a file or series of files to get a report of any violations.
61
64
62
65
::
63
66
@@ -71,5 +74,3 @@ violations
71
74
optparse.py:472:29: E221 multiple spaces before operator
72
75
optparse.py:544:21: W601 .has_key() is deprecated, use 'in'
73
76
74
- Conforming your style to PEP 8 is generally a good idea and helps make code a lot
75
- more consistent when working on projects with other developers.
0 commit comments