On Tue, 25 Feb 2003, Guido van Rossum wrote: > > > 3) Add an extra reset_exp function to sys. > > > More lame since it requires an extra function, > > > just to patch a "feature". > > > > This one gets my vote (if this were a democracy). "Explicit is > > better than implicit". The new symbol in the sys namespace also > > makes it easy to test for the capability (without a version number > > check). Maybe it should be called 'clear_exc' or 'reset_exc_info' > > (to match the C API name). > > Let's call it exc_reset() or exc_clear(). I'm going with exc_clear(), since 'clearing' seems to be the verb most people are using when talking about the action it performed. Implementation question: I'm planning to reuse the reset_exc_info function defined statically in ceval.c. Which of these options do you prefer: 1) Just remove the static declaration from reset_exc_info and add the prototype as an extern declaration to sysmodule.c. 2) Remove the static declaration from reset_exc_info and add the prototype to an include file. If so, which include file is the most appropriate place? 3) Move the implementation of reset_exc_info out of ceval to another, more public, file. If so, which one? I ask only because I usually submit bug fixes and minor changes, and am not familar enough with this part of the Python development culture. > > > 4) Keep things as they are, and expect the Spanish Inquision. > > > > I'm even okay with the status quo and can continue to use my current > > hack to clear exception data. > > You can always clear it by raising and catching another exception. :-) This is what I do, though I have a nice 10 line comment in the source to ward off much squinting and head scratching from our junior developers. Thanks, -Kevin -- Kevin Jacobs The OPAL Group - Enterprise Systems Architect Voice: (216) 986-0710 x 19 E-mail: jacobs@theopalgroup.com Fax: (216) 986-0714 WWW: http://www.theopalgroup.com
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4