[Python-checkins] r80463 - in python/branches/py3k: Doc/documenting/style.rst Doc/howto/doanddont.rst Doc/library/argparse.rst

georg.brandl python-checkins at python.org
Sun Apr 25 12:19:54 CEST 2010


Author: georg.brandl
Date: Sun Apr 25 12:19:53 2010
New Revision: 80463

Log:
Merged revisions 80150,80460-80461 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80150 | r.david.murray | 2010-04-17 17:45:38 +0200 (Sa, 17 Apr 2010) | 2 lines
  
  Update link to Apple Publication Style guide.
........
  r80460 | georg.brandl | 2010-04-25 12:16:00 +0200 (So, 25 Apr 2010) | 1 line
  
  #8528: fix typo.
........
  r80461 | georg.brandl | 2010-04-25 12:17:27 +0200 (So, 25 Apr 2010) | 1 line
  
  #8522: use with statement instead of try-finally for file handling.
........


Modified:
   python/branches/py3k/   (props changed)
   python/branches/py3k/Doc/documenting/style.rst
   python/branches/py3k/Doc/howto/doanddont.rst
   python/branches/py3k/Doc/library/argparse.rst

Modified: python/branches/py3k/Doc/documenting/style.rst
==============================================================================
--- python/branches/py3k/Doc/documenting/style.rst	(original)
+++ python/branches/py3k/Doc/documenting/style.rst	Sun Apr 25 12:19:53 2010
@@ -66,5 +66,5 @@
     1970s.
 
 
-.. _Apple Publications Style Guide: http://developer.apple.com/documentation/UserExperience/Conceptual/APStyleGuide/APSG_2008.pdf
+.. _Apple Publications Style Guide: http://developer.apple.com/mac/library/documentation/UserExperience/Conceptual/APStyleGuide/APSG_2009.pdf
 

Modified: python/branches/py3k/Doc/howto/doanddont.rst
==============================================================================
--- python/branches/py3k/Doc/howto/doanddont.rst	(original)
+++ python/branches/py3k/Doc/howto/doanddont.rst	Sun Apr 25 12:19:53 2010
@@ -199,11 +199,8 @@
 and perhaps not at all in non-C implementations (e.g., Jython). ::
 
    def get_status(file):
-       fp = open(file)
-       try:
+       with open(file) as fp:
            return fp.readline()
-       finally:
-           fp.close()
 
 
 Using the Batteries

Modified: python/branches/py3k/Doc/library/argparse.rst
==============================================================================
--- python/branches/py3k/Doc/library/argparse.rst	(original)
+++ python/branches/py3k/Doc/library/argparse.rst	Sun Apr 25 12:19:53 2010
@@ -1700,7 +1700,7 @@
 Originally, the argparse module had attempted to maintain compatibility with
 optparse.  However, optparse was difficult to extend transparently, particularly
 with the changes required to support the new ``nargs=`` specifiers and better
-usage messges.  When most everything in optparse had either been copy-pasted
+usage messages.  When most everything in optparse had either been copy-pasted
 over or monkey-patched, it no longer seemed practical to try to maintain the
 backwards compatibility.
 


More information about the Python-checkins mailing list