예약어 pass

Programming/Python 2012. 11. 26. 00:19 |

The pass statement does nothing. It can be used when a statement is required syntactically but the program requires no action. For example:

>>> while True: ... pass # Busy-wait for keyboard interrupt ... pass 는 아무것도 실행하지 않는다.

실행할 필요는 없는데 아무것도 넣지않으면 구문적인 오류가 발생할경우에 
사용하게 된다.

즉, pass 는 어떤 코드를 넣어야 하는데 그냥 지나가고 싶을 때 사용할 수 있다.

'Programming > Python' 카테고리의 다른 글

python의 Backticks ( repr() )  (0) 2012.11.26
함수  (0) 2012.11.26
Python 제어문(if, for, while)  (0) 2012.11.25
메모리 관리(쓰레기 수집) // 객체의 신원 식별  (0) 2012.11.25
파이썬의 객체 자료형  (0) 2012.11.25
Posted by scii
: