Skip to content

Commit 7cd7d7f

Browse files
committed
Finally
1 parent d0d7bd1 commit 7cd7d7f

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -758,11 +758,24 @@ while True:
758758
break
759759
```
760760

761-
#### Raise exception
761+
#### Raising exception:
762762
```python
763763
raise IOError("input/output error")
764764
```
765765

766+
#### Finaly:
767+
```python
768+
>>> try:
769+
... raise KeyboardInterrupt
770+
... finally:
771+
... print('Goodbye, world!')
772+
...
773+
Goodbye, world!
774+
Traceback (most recent call last):
775+
File "<stdin>", line 2, in <module>
776+
KeyboardInterrupt
777+
```
778+
766779

767780
Bytes
768781
-----

0 commit comments

Comments
 (0)