python pass用法

1、空语句 do nothing

2、保证格式完整
3、保证语义完整
4、以if语句为例:
C/C++中写法:
if(true)
; // do nothing
else
{} // do nothing
 
python中写法:
if true:
pass # do nothing
else:
print "do something."
posted on 2017-01-19 21:19  暮雪冰城  阅读(151)  评论(0)    收藏  举报