Skip to main content

Python 如何查找程序中的bug

Published 1 min readMarkdown
Python 如何查找程序中的bug

什么是bug

bug定义

  • 程序中出现的错误,但又没有通过异常去捕获,以至于直接抛出,导致程序的崩溃

bug一词的由来

  • bug指的是 小虫
  • 飞入计算机中导致机器停止

代码

# coding:utf-8
print('test1')
a = 1
print(a)
print('test2')
b = 2
print(b)
print('test3')
c = 3
print(c)
print('test4')
d = 4
print(d)

print('test5')
def test1():
    print(5)


test1()

3 views

No comments yet. Be the first to comment.

More from this blog