Nick Coghlan added the comment:

Latest version is a more general cleanup patch for PEP 8 (hence the change in 
the issue title). Enumerating all the changes/additions:

1. Added an intro paragraph that makes it clear this is a living document, not 
"set and forget".

2. Added a couple more explicit reasons to the "foolish consistency" section, 
and tweaked the header for that list to help make it clearer that there may be 
other good reasons, these are just especially good ones.

3. Updated the tabs and spaces section for Python 3

4. Changed the rationale for the line length limit. These days, it is about 
side-by-side editor windows, diff tools, and online text editing widgets, not 
ancient terminals with limited column widths.

5. Cleaned up the encoding cookie guidelines for Python 3

6. Changed the absolute vs explicit relative import discussion to state that 
while absolute imports are recommended, there are valid reasons to use explicit 
relative imports. Added an explicit admonition that the standard library should 
always absolute imports, and that *nobody* should use implicit relative imports.

7. Added a guideline to avoid wildcard imports

8. The new section on public vs internal interfaces

9. Clarified that it's not just Jython that omits the += hack, and that it is 
fairly easy to break it in CPython, too.

10. Added a guideline about using def rather than assigning a lambda to a name.

11. Rewrote the class based exception guideline to account for the requirement 
that all exceptions inherit from BaseException, as well as the exception 
hierarchy design lessons we have learned that led to the creation of PEP 3151 
(which explicitly *rejects* the per-module generic exception approach 
previously recommended by PEP 8)

12. Clarified what a "non-error exception" might be used for.

13. Added a guideline about exception chaining

14. For the exception raising guideline, moved Python 3 compatibility up as the 
main motivating factor

15. Added a guideline about using the "as" clause to bind a caught exception to 
a name

16. Added a guideline explicitly favouring PEP 3151 based exception handling 
over errno introspection

17. Added a note about the Python 3 text model changes to the isinstance 
guideline

18. Added a recommendation that third party experiments with function 
annotations combine them with a decorator that indicates how they're to be 
interpreted

----------
Added file: http://bugs.python.org/file31050/issue18472_pep_8_update4.diff

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18472>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to