Remember, all of these assumptions are wrong.
- All Python code should follow PEP 8.
- If you use a tool named pep8, your code will be PEP 8 compliant.
- If your code is PEP 8 compliant, a tool named pep8 will accept it.
- The Python Standard Library is PEP 8 compliant.
- Okay, at least the new parts of the standard library are PEP 8 compliant.
- PEP 8 compliant code is inherently better than non-compliant code.
- PEP8-ing existing code will improve it.
- Once code is PEP 8 compliant, it can easily be kept that way through subsequent edits.
- PEP 8 never changes.
- Well, it never materially changes.
- I mean, new advice, sure, but it'll never actually go back on a rule.
- The line length limit is obsolete in an age of high-resolution displays.
- Okay, but if you disregard side-by-side windows, lines of code can be arbitrarily long without hurting readability.
- Well, maybe not several hundred characters, but surely 120 characters of code on a line is easy enough to read.
- The only valid white space is line breaks and U+0020 SPACE.
- Okay, U+0009 TAB when lining up columns, but no other white space.
- Oh, come on, no-one would use U+000C FORM FEED in source code.
- Everyone uses the same sort of tools (visual text editors) to read and write code.
- Ignoring the few weirdos who can cope with their own bizarre choices, every NORMAL person uses the same sort of tools.
- Alright, everyone at my organization will use the same tools. I can mandate that, so it must be true.
- Readability is an inherent quality of code. It doesn't matter who reads it, good code is good code.
- Avoiding the "Names to Avoid" is a sure and simple way to make sure your identifiers aren't confusable.
- Unicode is good for identifiers.
- Unicode is bad for identifiers.
- Unicode is optional for identifiers.
- You know what I mean. I'm talking about *non-ASCII* characters. And you shouldn't use them.
- PEP 8 is a tool for denying patches/pull requests that you should reject.
As with the articles I'm riffing off, every one of these is false, and I can give examples. And this is far from an exhaustive list. If you want to avoid the worst of the errors, start by reading the actual document (not some tool that borrows its name), particularly the section entitled "A Foolish Consistency is the Hobgoblin of Little Minds".
With thanks to Ben Finney and Dan Sommers for contributions to the above list.