python-dev Summary for 2004-02-01 through 2004-02-29
Josiah Carlson
jcarlson at nospam.uci.edu
Wed Mar 17 21:21:22 EST 2004
> Why would you need to dynamically add exceptions? My mind
> is beginning to boggle trying to find a use case for this.
I could only see it as a pseudo-optimization of the below...
if catch_some_a:
try:
#stuff
except TypeError:
#do stuff
elif catch_some_b:
try:
#stuff
except ValueError:
#do stuff
elif catch_all:
try:
#stuff
except TypeError, ValueError:
#do stuff
But who would do this? I have no idea.
- Josiah
More information about the Python-list
mailing list