[Python-checkins] peps: Clarify statement at Barry's request

antoine.pitrou python-checkins at python.org
Tue Oct 11 23:54:33 CEST 2011


http://hg.python.org/peps/rev/8967a7ce3183
changeset:   3957:8967a7ce3183
user:        Antoine Pitrou <solipsis at pitrou.net>
date:        Tue Oct 11 23:50:49 2011 +0200
summary:
  Clarify statement at Barry's request

files:
  pep-3151.txt |  6 +++++-
  1 files changed, 5 insertions(+), 1 deletions(-)


diff --git a/pep-3151.txt b/pep-3151.txt
--- a/pep-3151.txt
+++ b/pep-3151.txt
@@ -193,10 +193,14 @@
 * useful compatibility doesn't make exception catching any narrower, but
   it can be broader for *careless* exception-catching code.  Given the following
   kind of snippet, all exceptions caught before this PEP will also be
-  caught after this PEP, but the reverse may be false::
+  caught after this PEP, but the reverse may be false (because the coalescing
+  of ``OSError``, ``IOError`` and others means the ``except`` clause throws
+  a slightly broader net)::
   
       try:
+          ...
           os.remove(filename)
+          ...
       except OSError:
           pass
 

-- 
Repository URL: http://hg.python.org/peps


More information about the Python-checkins mailing list