Skip to content

Commit 38e0950

Browse files
committed
Updates Python异常.md
Auto commit by GitBook Editor
1 parent 4c55dca commit 38e0950

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Python异常.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,16 +365,21 @@ if __debug__:
365365
```
366366

367367
assert实现: 手动触发异常;
368+
```python
368369
assert condition[,expression]
369370

370371
if __debug__:
371372
if not condition:
372373
raise AssertionError,expression
373-
374+
```
374375
Python异常对象:
376+
375377
BaseException:
378+
376379
三个基本抽象类;
380+
377381
raise手动触发异常;
382+
378383
assert断言(raise的特殊表现)
379384

380385

0 commit comments

Comments
 (0)