Python基础 · 免费预览

错误与异常

能够阅读回溯,判断错误发生在哪里、属于哪种类型。能够描述语法错误、缩进错误、名称错误、索引错误和文件缺失错误分别在哪些情况下发生。

1. Overview

Overview

2. Long Tracebacks

Long Tracebacks

3. Reading Error Messages

Reading Error Messages

4. Better errors on newer Pythons

Better errors on newer Pythons

5. Syntax Errors

Syntax Errors

6. Tabs and Spaces

Tabs and Spaces

7. Variable Name Errors

Variable Name Errors

8. Index Errors

Index Errors

9. File Errors

File Errors

10. Identifying Syntax Errors

Identifying Syntax Errors

11. Identifying Variable Name Errors

Identifying Variable Name Errors

12. Identifying Index Errors

Identifying Index Errors

进入交互式练习

免费注册 · 即时批改 · 自动安排间隔复习。

免费开始这门课