R
Roy Smith
I noticed something interesting today. In C++, you write:
try {
throw foo;
} catch {
}
and all three keywords are verbs, so when you describe the code, you can
use the same English words as in the program source, "You try to execute
some code, but it throws a foo, which is caught by the handler".
In Python, you write:
try:
raise foo
except:
and now you've got a mix of verbs and (I think), a preposition. You can't
say, "You try to execute some code, but it raises a foo, which is excepted
by the handler". It just doesn't work grammatically.
Sigh.
try {
throw foo;
} catch {
}
and all three keywords are verbs, so when you describe the code, you can
use the same English words as in the program source, "You try to execute
some code, but it throws a foo, which is caught by the handler".
In Python, you write:
try:
raise foo
except:
and now you've got a mix of verbs and (I think), a preposition. You can't
say, "You try to execute some code, but it raises a foo, which is excepted
by the handler". It just doesn't work grammatically.
Sigh.