Python3 源码中注释的问题

zoe9698 zoe9698 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
 def start(self):
'''
Start child process
'''
assert self._popen is None, 'cannot start a process twice'
assert self._parent_pid == os.getpid(), \
'can only start a process object created by current process'
assert not _current_process._config.get('daemon'), \
'daemonic processes are not allowed to have children'
_cleanup()
self._popen = self._Popen(self)
self._sentinel = self._popen.sentinel
_children.add(self)


这是Python3.6 Process模块的源码,想问下大神,为什么“ assert self._popen is None, 'cannot start a process twice' ”出现这种,后面的英文是注释或提示的意思嘛?
...全文

相关推荐

评论 5
收藏 已收藏
分享
返回顶部
zoe9698
脚本语言 37,738 成员 34,208 内容