Skip to content

Commit 8105eb3

Browse files
committed
add exception
1 parent 2c610ea commit 8105eb3

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* [ 深入 Python :Dive Into Python 中文版](http://sebug.net/paper/books/dive-into-python/)
1919
* [crossin的编程教室](http://crossin.me/forum.php?mod=forumdisplay&fid=2)
2020
* [深入 Python 3](http://sebug.net/paper/books/dive-into-python3/)
21-
* [Python安全](http://sebug.net/paper/books/vulncat/python/)
21+
* [ython安全](http://sebug.net/paper/books/vulncat/python/)
2222

2323
### 英文资源
2424
* [dive into python](http://www.diveintopython.net/toc/index.html)

exception.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/python
2+
#coding:utf-8
3+
import sys;
4+
try:
5+
1/0;
6+
except :# 所有异常
7+
print "Unexpected error:", sys.exc_info()[0]
8+
else:
9+
print 'no except';
10+
finally:
11+
print 'always excute';

0 commit comments

Comments
 (0)