From 5464ab3c8d9d2d76d0e164f56c4280545e5f6581 Mon Sep 17 00:00:00 2001 From: Kevin Burke Date: Tue, 13 Mar 2012 00:09:13 -0700 Subject: [PATCH] refactor the style page. --- docs/writing/style.rst | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/docs/writing/style.rst b/docs/writing/style.rst index 803dca1..e1e713d 100644 --- a/docs/writing/style.rst +++ b/docs/writing/style.rst @@ -38,8 +38,10 @@ Also known as PEP 20, the guiding principles for Python's design. If the implementation is easy to explain, it may be a good idea. Namespaces are one honking great idea -- let's do more of those! -See ``_ for some -examples. +For some examples of good Python style, see `this Stack Overflow question +`_ or `these +slides from a Python user group +`_. PEP 8 ----- @@ -48,16 +50,17 @@ PEP 8 is the de-facto code style guide for Python. `PEP 8 `_ -There exists a command-line program, `pep8` that can check your code for -conformance. +Conforming your Python code to PEP 8 is generally a good idea and helps make +code more consistent when working on projects with other developers. There +exists a command-line program, `pep8 `_, +that can check your code for conformance. :: - pip install pep8 + $ pip install pep8 -Simply run it on a file or series of files and get a report of any -violations +Simply run it on a file or series of files to get a report of any violations. :: @@ -71,5 +74,3 @@ violations optparse.py:472:29: E221 multiple spaces before operator optparse.py:544:21: W601 .has_key() is deprecated, use 'in' -Conforming your style to PEP 8 is generally a good idea and helps make code a lot -more consistent when working on projects with other developers.