python中pass语句学习
2017-01-18 13:31
369 查看
pass语句什么也不做,一般作为占位符或者创建占位程序,pass语句不会执行任何操作,比如:
while False:
pass
pass通常用来创建一个最简单的类:
class MyEmptyClass:
pass
pass在软件设计阶段也经常用来作为TODO,提醒实现相应的实现,比如:
def initlog(*args):
pass #please implement this
原文链接:http://mianshi.fenzhi.com/post/1529.html
while False:
pass
pass通常用来创建一个最简单的类:
class MyEmptyClass:
pass
pass在软件设计阶段也经常用来作为TODO,提醒实现相应的实现,比如:
def initlog(*args):
pass #please implement this
原文链接:http://mianshi.fenzhi.com/post/1529.html
相关文章推荐
- Python学习之[5]——pass语句
- python学习之while语句
- python 学习笔记 if语句(10)
- Python学习笔记:条件、循环和其他语句
- Python学习笔记(八):Python语句简介、赋值、表达式和打印
- Python学习入门基础教程(learning Python)--3.1Python的if分支语句
- python之 break语句和continue语句及PASS语句
- Python学习入门基础教程(learning Python)--3.2 if-else分支语句 .
- Python3.3 学习笔记7 - 控制语句
- Python基础教程学习笔记----第五章 条件、循环和其他语句
- Python学习入门基础教程(learning Python)--1.2.1 Python输出语句print基本使用 .
- python 学习笔记 while语句(11)
- Python学习--控制语句:if, while, for, break, continue
- python学习之语句:循环语句(for,while)
- python 条件,循环和其他语句的学习笔记
- Python 学习笔记(一)语句,变量,函数
- Python学习笔记——控制语句
- python学习之——语句结构
- python pass (空操作)语句
- Python学习入门基础教程(learning Python)--3.1Python的if分支语句 .