This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients barry, michael.foord, ncoghlan, terry.reedy
Date 2013-07-27.06:38:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1374907127.49.0.519033043684.issue18472@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2013-07-27 06:38:49ncoghlansetrecipients: + ncoghlan, barry, terry.reedy, michael.foord
2013-07-27 06:38:47ncoghlansetmessageid: <1374907127.49.0.519033043684.issue18472@psf.upfronthosting.co.za>
2013-07-27 06:38:47ncoghlanlinkissue18472 messages
2013-07-27 06:38:46ncoghlancreate