Django: Ticket #4933: django/core/ violates PEP8 and has a typo <p> Call it nitpicking, but I noticed that there was a 160-byte wide line in <tt>django/core/</tt> and thought I'd break it up a bit and ended up rewriting 50% of the file. </p> <p> Anyway, it's not very important or anything, just wanted to have the file adhere to PEP8. Feel free to ignore this (but perhaps at least fix the typo). </p> <p> Did a manual regression test and I couldn't catch anything. </p> en-us Django Trac 1.0.9 Ludvig Ericson <ludvig.ericson@…> Fri, 20 Jul 2007 10:08:54 GMT attachment set <ul> <li><strong>attachment</strong> set to <em></em> </li> </ul> Ticket Simon G. <dev@…> Sun, 22 Jul 2007 05:58:29 GMT stage changed; needs_better_patch, needs_tests, needs_docs set <ul> <li><strong>needs_better_patch</strong> unset </li> <li><strong>stage</strong> changed from <em>Unreviewed</em> to <em>Ready for checkin</em> </li> <li><strong>needs_tests</strong> unset </li> <li><strong>needs_docs</strong> unset </li> </ul> Ticket mtredinnick Sun, 12 Aug 2007 10:28:47 GMT <p> We can certainly fix the typo (good catch). </p> <p> I've reformatted the if test a bit as well to break it over lines. However, the rest of the rewrite, although well-intentioned, slows down the code a bit: every time you construct a try-except block, Django has to save the current stack frame and then free it later For something that is executed for every single response, we should be a little wary of adding overhead like that. The existing code gets there without the extra work, so I prefer that. </p> Ticket mtredinnick Sun, 12 Aug 2007 10:30:00 GMT status changed; resolution set <ul> <li><strong>status</strong> changed from <em>new</em> to <em>closed</em> </li> <li><strong>resolution</strong> set to <em>fixed</em> </li> </ul> <p> (In <a class="changeset" href="">[5870]</a>) Fixed <a class="closed ticket" href="" title="django/core/ violates PEP8 and has a typo (closed: fixed)">#4933</a> -- Fixed a typo and reformatted a fairly long line in passing. Thanks, Ludvig Ericson. </p> Ticket Ludvig Ericson <ludvig.ericson@…> Sun, 12 Aug 2007 11:27:53 GMT <p> Good point, (and when you say Django needs to save the stack frame, I assume you mean Python? :-) I didn't know that actually. </p> Ticket