Python keywords vs. English grammar

Roy Smith roy at
Wed May 24 14:57:33 CEST 2006

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:

   raise foo

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.


More information about the Python-list mailing list