Clarify some style points, such as fill column, double-spacing at the

end of sentences, etc.  Add a reference to PEP 9, a new sample PEP
template.
This commit is contained in:
Barry Warsaw 2001-08-14 23:58:09 +00:00
parent fcfb160406
commit 9a5ae7dfc2
1 changed files with 25 additions and 9 deletions

View File

@ -169,11 +169,13 @@ What belongs in a successful PEP?
reference or the standard library reference.
PEP Style
PEP Template
PEPs are written in plain ASCII text, and should adhere to a
rigid style. There is a Python script that parses this style and
converts the plain text PEP to HTML for viewing on the web[5].
PEP 9 contains a boilerplate[7] template you can use to get
started writing your PEP.
Each PEP must begin with an RFC822 style header preamble. The
headers must appear in the following order. Headers marked with
@ -215,9 +217,10 @@ PEP Style
the author, or on the python-list or python-dev email mailing
lists.
Post-History: is used to record the dates of when new versions of
the PEP are posted to python-list and/or python-dev. The should
be in dd-mmm-yyyy format, e.g. 14-Aug-2001.
Created: records the date that the PEP was assigned a number,
while Post-History: is used to record the dates of when new
versions of the PEP are posted to python-list and/or python-dev.
Both headers should be in dd-mmm-yyyy format, e.g. 14-Aug-2001.
PEPs may have a Requires: header, indicating the PEP numbers that
this PEP depends on.
@ -228,6 +231,9 @@ PEP Style
PEP must have a Replaces: header containing the number of the PEP
that it rendered obsolete.
PEP Formatting Requirements
PEP headings must begin in column zero and the initial letter of
each word must be capitalized as in book titles. Acronyms should
be in all capitals. The body of each section must be indented 4
@ -236,8 +242,15 @@ PEP Style
make the text readable. You must use two blank lines between the
last line of a section's body and the next section heading.
You must adhere to the Emacs convention of adding two spaces at
the end of every sentence. You should fill your paragraphs to
column 70, but under no circumstances should your lines extend
past column 79. If your code samples spill over column 79, you
should rewrite them.
Tab characters must never appear in the document at all. A PEP
should include the Emacs stanza included by example in this PEP.
should include the standard Emacs stanza included by example at
the bottom of this PEP.
A PEP must contain a Copyright section, and it is strongly
recommended to put the PEP in the public domain.
@ -310,14 +323,17 @@ References and Footnotes
[4] http://www.opencontent.org/openpub/
[5] The script referred to here is pep2html.py, which lives in
the same directory in the CVS tree as the PEPs themselves. Try
"pep2html.py --help" for details.
the same directory in the CVS tree as the PEPs themselves.
Try "pep2html.py --help" for details.
The URL for viewing PEPs on the web is
http://python.sourceforge.net/peps/
[6] http://sourceforge.net/tracker/?group_id=5470&atid=305470
[7] PEP 9, Sample PEP Template
http://www.python.org/peps/pep-0009.html
Copyright