小编nav*_*een的帖子

为什么我得到AttributeError:'module'对象没有属性'set_trace'

import pdb 
print("program started") 
c=100 
d=200 
pdb.set_trace() 
def fun(a,b): 
    print a,b 
    return a+b 
fun(c,d) 
for i in [1,2,3,4,5]: 
    print 10/i 
    print ("other statements in program") 
print ("program ended")
Run Code Online (Sandbox Code Playgroud)

python pdb

1
推荐指数
2
解决办法
2428
查看次数

标签 统计

pdb ×1

python ×1