I am working on PEP 352 stuff for 2.6 and there are two changes that I think should be made that are not explicitly laid out in the PEP.

First, and most dramatic, involves what is legal to list in an 'except' clause.  Right now you can listing *anything*.  This means ``except 42`` is totally legal even though raising a number is not.  Since I am deprecating catching string exceptions, I can go ahead and deprecate catching *any* object that is not a legitimate object to be raised.

The second thing is changing PyErr_GivenExceptionMatches() to return 0 on false, 1 on true, and -1 on error.  As of right now there is no defined error return value.  While it could be suggested to check PyErr_Occurred() after every call, there is a way to have the return value reflect all possible so I think this changed should be made.

Anybody have objections with any of the changes I am proposing?

-Brett
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to