demo_ref_keyword_raise2.py:
x = "hello" if not type(x) is int: raise TypeError("Only integers are allowed")
C:\Users\My Name>python demo_keyword_raise2.py
Traceback (most recent call last):
File "demo_ref_keyword_raise2.py", line 4, in <module>
raise TypeError("Only integers are allowed")
TypeError: Only integers are allowed