From 4766c75967e8dbf805ebd1c8a7af0f6dd0516fc0 Mon Sep 17 00:00:00 2001 From: Prabhu Ramachandran Date: Wed, 11 Feb 2015 18:38:25 +0530 Subject: Raise exception correctly. --- slides/basic_python/python_part2.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'slides/basic_python') diff --git a/slides/basic_python/python_part2.tex b/slides/basic_python/python_part2.tex index e0ca77e..9faddfd 100644 --- a/slides/basic_python/python_part2.tex +++ b/slides/basic_python/python_part2.tex @@ -262,7 +262,7 @@ TypeError: cannot concatenate 'str' and 'int' objects ... print "Invalid number, try again..." ... >>> # To raise exceptions -... raise ValueError, "your error message" +... raise ValueError("your error message") Traceback (most recent call last): File "", line 2, in ? ValueError: your error message -- cgit