>>> import pdb
>>> x = [1,2,3,4,5]
>>> y = 6
>>> z = 7
>>> r1 = y+z
>>> r1
13
>>> r2 = x+y
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: can only concatenate list (not "int") to list
>>> pdb.set_trace()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.6/pdb.py", line 1585, in set_trace
Pdb().set_trace(sys._getframe().f_back)
File "/usr/lib/python3.6/pdb.py", line 156, in __init__
readline.set_completer_delims(' \t\n`@#$%^&*()=+[{]}\\|;:\'",<>?')
AttributeError: module 'readline' has no attribute 'set_completer_delims'
>>>
什么问题?运行python3.6发生错误 我只是尝试在Cygwin上使用pdb。 (请注意,其他lib也可以)
答案 0 :(得分:0)
对于我来说,该问题已通过安装pyreadline得以解决:
pip install pyreadline
请尝试。