Python, 예외처리
프로그램의 제어흐름을 조정하기 위해 사용하는 이벤트를 예외(Exception)라고 함.기본적으로 파이썬에서는 아무런 처리를 하지 않는 예외에 대하여 자동으로 에러(Error)를 일으키며, 사용자의 제어흐름을 벗어난 에러문을 출력하고 프로그램을 종료함.>>> a = [1,2,3]>>> a[3] #리스트 그기를 벗어난 인덱스참조Traceback (most recent call last): File "", line 1, in a[3]IndexError: list index out of range>>> 위처럼 비정상적인 종료를 일으키는 예외를 '처리되지 않은 예외(Unhandled Exception)'라고 함. >> 구문에러 > print('a) File "", line 1 print('a) ^SyntaxErr..
Python
2016. 4. 29. 13:09
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- indicatoron
- command
- apache
- Module
- tkinter command & bind [명령어묶기와 사건묶기] Python
- Private
- 리눅스
- activeforeground
- 파이썬
- JPA
- checkbutton
- 폼
- tkinter
- Java
- IdClass
- highlightbackground
- vba
- borderwidth
- Excel
- FetchType
- disabledforeground
- fetch join
- activebackground
- Python
- onetomany
- Linux
- 상수
- Composite Key
- highlightthickness
- ManyToOne
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
글 보관함