PEP8 needs revision

Kyle Thomas wetlife at gmail.com
Wed Jun 15 15:18:19 EDT 2016


To Whom It May Concern,
Knuth's quote refers to the output of TeX, the programming language he
authored. The quote cannot be interpreted to speak about formatting of
source-code. One bit of evidence I can offer is that TeX's source only
cares about multiple newlines in considering the multiplicity of
whitespace. This means that Knuth's quote likely has little or no bearing
on the format of source-code.

Further, TeX, being a modal language, has two modes of outputting math:
inline(like in a paragraph) and display. This is what the quote refers to.
So, Knuth is quoted referring to the output of his language, not the format
of its source. He wrote that a binary operator is printed before a
line-break in inline-mode of TeX's output while that same operator is
printed after the newline in display-mode.

PEP8's reference to Knuth's quote as a definitive rule for formatting
python source-code is inappropriate. Is PEP8 a joke at the expense pedantry
common of those new to programming?

PS: Knuth's quote was taken from The TeXbook, a text about his programming
language.

-Kyle



More information about the Python-list mailing list