summaryrefslogtreecommitdiffstats
path: root/Modules/defmakexp_aix
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1996-12-10 18:07:35 (GMT)
committerGuido van Rossum <guido@python.org>1996-12-10 18:07:35 (GMT)
commit0aa9ee65ab66627c2d065d213090aec93e634ee9 (patch)
treeee0ec8ac491f39baddc05994df998553714bcd2e /Modules/defmakexp_aix
parent6c31a14de7b9a447fa476b773ae895b219f212e6 (diff)
downloadcpython-0aa9ee65ab66627c2d065d213090aec93e634ee9.zip
cpython-0aa9ee65ab66627c2d065d213090aec93e634ee9.tar.gz
cpython-0aa9ee65ab66627c2d065d213090aec93e634ee9.tar.bz2
Moved the raise logic out of the main interpreter loop to a separate function.
The raise logic has one additional feature: if you raise <class>, <value> where <value> is not an instance, it will construct an instance using <value> as argument. If <value> is None, <class> is instantiated without arguments. If <value> is a tuple, it is used as the argument list. This feature is intended to make it easier to upgrade code from using string exceptions to using class exceptions; without this feature, you'd have to change every raise statement from ``raise X'' to ``raise X()'' and from ``raise X, y'' to ``raise X(y)''. The latter is still the recommended form (because it has no ambiguities about the number of arguments), but this change makes the transition less painful.
Diffstat (limited to 'Modules/defmakexp_aix')
0 files changed, 0 insertions, 0 deletions