python报错:AttributeError: module 'pdb' has no attribute 'set_trace'

In the first use in python pdb modular, pdb.set_trace (when) the compiler will complain always, always thought it was the beginning of his spelling errors, but after repeated examination revealed not their spelling errors. But the name of the test file I created is pdb.py This leads to the modules we introduced the test file that we have created. The solution is to change the name of the test file on the line.

It also tells us must not use keywords to name!

Guess you like

Origin www.cnblogs.com/zoutingrong/p/12210332.html