好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

Python两种错误类型的介绍

到现在为止都没有过多介绍错误信息,但是已经在一些示例中使用过错误信息。Python至少有两种类型的错误: 语法错误 以及 异常

8.1 Syntax Errors

语法错误,也称解析错误,是Python初学者经常抱怨的问题。

>>> while True print('Hello world')
  File "<stdin>", line 1while True print('Hello world')                   ^SyntaxError: invalid syntax 

查看更多关于Python两种错误类型的介绍的详细内容...

  阅读:45次