[Python-checkins] peps: I understand what Nick meant now
benjamin.peterson
python-checkins at python.org
Tue Feb 28 00:59:30 CET 2012
http://hg.python.org/peps/rev/38cd1efd3148
changeset: 4091:38cd1efd3148
user: Benjamin Peterson <benjamin at python.org>
date: Mon Feb 27 18:59:27 2012 -0500
summary:
I understand what Nick meant now
files:
pep-0415.txt | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/pep-0415.txt b/pep-0415.txt
--- a/pep-0415.txt
+++ b/pep-0415.txt
@@ -41,11 +41,12 @@
Proposal
========
-A new attribute on ``BaseException``, ``__suppress_context__``, will be
-introduced. The ``raise exc from None`` syntax will cause
-``exc.__suppress_context__`` to be set to ``True``. Exception printing code will
-check for the attribute to determine whether context and cause will be
-printed. ``__cause__`` will return to its original purpose and values.
+A new attribute on ``BaseException``, ``__suppress_context__``, will
+be introduced. The ``raise exc from cause`` syntax will set
+``exc.__suppress_context__`` to ``True``. Exception printing code will
+check for that attribute to determine whether context and cause will
+be printed. ``__cause__`` will return to its original purpose and
+values.
There is precedence for ``__suppress_context__`` with the
``print_line_and_file`` exception attribute.
@@ -53,7 +54,7 @@
To summarize, ``raise exc from cause`` will be equivalent to::
exc.__cause__ = cause
- exc.__suppress_context__ = cause is None
+ exc.__suppress_context__ = True
raise exc
Patches
--
Repository URL: http://hg.python.org/peps
More information about the Python-checkins
mailing list