I'm going to look into this, but thought I'd share the misery:
CREATE FUNCTION crash() RETURNS varchar AS 'plpy.execute("syntax error")' language 'plpython';
SELECT crash();
-Brad