pythonreference.com

search statements, functions, methods, exceptions*

show categories

raise
raise an exception
raise IndexError('oops')
this creates the same error condition as that normally generated by Python