• Guido van Rossum's avatar
    Moved the raise logic out of the main interpreter loop to a separate function. · 0aa9ee65
    Guido van Rossum yazdı
    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.
    0aa9ee65
Adı
Son kayıt (commit)
Son güncelleme
Demo Loading commit data...
Doc Loading commit data...
Grammar Loading commit data...
Include Loading commit data...
Lib Loading commit data...
Mac Loading commit data...
Misc Loading commit data...
Modules Loading commit data...
Objects Loading commit data...
PC Loading commit data...
Parser Loading commit data...
Python Loading commit data...
Tools Loading commit data...
.hgtags Loading commit data...
BUGS Loading commit data...
Makefile.in Loading commit data...
README Loading commit data...
TODO Loading commit data...
acconfig.h Loading commit data...
config.h.in Loading commit data...
configure Loading commit data...
configure.in Loading commit data...
install-sh Loading commit data...