运行 ❯
拥有你自己的 Python 服务器
×
更改方向
更改主题,深色/浅色
前往 Spaces
x = "hello" if not type(x) is int: raise TypeError("Only integers are allowed")
回溯 (最近一次调用最后)
文件 "demo_ref_keyword_raise2.py", 第 4 行, 在 <module>
raise TypeError("Only integers are allowed")
TypeError: Only integers are allowed