#23395: Clarification on PEP 8 E501: line too long (> 79 characters)
-------------------------------+--------------------
Reporter: nrogers64 | Owner: nobody
Type: Uncategorized | Status: new
Component: Documentation | Version: 1.6
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------
From [https://docs.djangoproject.com/en/1.6/internals/contributing
/writing-code/coding-style/ the "Coding style" documentation]:
> One big exception to PEP 8 is our preference of longer line lengths.
We’re well into the 21st Century, and we have high-resolution computer
screens that can fit way more than 79 characters on a screen. Don’t limit
lines of code to 79 characters if it means the code looks significantly
uglier or is harder to read.
I have two issues with this:
1. It says that you don't have a limit of 79 characters, but it doesn't
say what you do instead. Is a line that is 1000+ characters acceptable?
1. It seems to imply that this PEP 8 rule is outdated and that there is
absolutely no reason whatsoever that anybody should follow it in a Django
project these days. It's even worded in kind of a condescending manner, in
my opinion. However, many developers prefer to have multiple files open
side by side. For example, they might have a models.py and views.py file
open side by side, or even multiple views of the same file open side by
side. The limit of 79 characters is helpful here. I would suggest taking
out the "21st Century" bit which seems to be there to justify Django not
following this PEP 8 rule, but, as I've pointed out, it doesn't really
justify it.
--
Ticket URL: <https://code.djangoproject.com/ticket/23395>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/052.309cd86d29c555462d856a2a08ce15f0%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.