[Python-Dev] [Python-checkins] cpython (3.2): adjust braces a bit (original) (raw)
Eric V. Smith eric at trueblade.com
Fri Oct 21 17:45:20 CEST 2011
- Previous message: [Python-Dev] memcmp performance
- Next message: [Python-Dev] [Python-checkins] cpython (3.2): adjust braces a bit
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
What's the logic for adding some braces, but removing others?
On 10/19/2011 4:58 PM, benjamin.peterson wrote:
http://hg.python.org/cpython/rev/9c79a25f4a8b changeset: 73010:9c79a25f4a8b branch: 3.2 parent: 72998:99a9f0251924 user: Benjamin Peterson <benjamin at python.org> date: Wed Oct 19 16:57:40 2011 -0400 summary: adjust braces a bit
files: Objects/genobject.c | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/Objects/genobject.c b/Objects/genobject.c --- a/Objects/genobject.c +++ b/Objects/genobject.c @@ -232,8 +232,9 @@ /* First, check the traceback argument, replacing None with NULL. */ - if (tb == PyNone) + if (tb == PyNone) { tb = NULL; + } else if (tb != NULL && !PyTraceBackCheck(tb)) { PyErrSetString(PyExcTypeError, "throw() third argument must be a traceback object"); @@ -244,9 +245,8 @@ PyXINCREF(val); PyXINCREF(tb); - if (PyExceptionClassCheck(typ)) { + if (PyExceptionClassCheck(typ)) PyErrNormalizeException(&typ, &val, &tb); - } else if (PyExceptionInstanceCheck(typ)) { /* Raising an instance. The value should be a dummy. */ @@ -262,10 +262,9 @@ typ = PyExceptionInstanceClass(typ); PyINCREF(typ); - if (tb == NULL) { + if (tb == NULL) /* Returns NULL if there's no traceback */ tb = PyExceptionGetTraceback(val); - } } } else {
Python-checkins mailing list Python-checkins at python.org http://mail.python.org/mailman/listinfo/python-checkins
- Previous message: [Python-Dev] memcmp performance
- Next message: [Python-Dev] [Python-checkins] cpython (3.2): adjust braces a bit
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]