Python 3.5 : TypeError: __init__() got an unexpected keyword argument 'nosigint' -


i using python 3.5 doctest. there error:

  file "d:\program files\anaconda\lib\doctest.py", line 357, in __init__     pdb.pdb.__init__(self, stdout=out, nosigint=true)  typeerror: __init__() got unexpected keyword argument 'nosigint' 

it seems error occurs in doctest.py file, not in own code.

i hope define class similar dict. code is:

class dict(dict):     '''     simple dict support access x.y style.      >>> d1 = dict()     >>> d1['x'] = 100     >>> d1.x     100     >>> d1.y = 200     >>> d1['y']     200     >>> d2 = dict(a=1, b=2, c='3')     >>> d2.c     '3'     >>> d2['empty']     traceback (most recent call last):         ...     keyerror: 'empty'     >>> d2.empty     traceback (most recent call last):         ...     attributeerror: 'dict' object has no attribute 'empty'     '''     def __init__(self, **kw):         super(dict, self).__init__(**kw)      def __getattr__(self, key):         try:             return self[key]         except keyerror:             raise attributeerror(r"'dict' object has no attribute '%s'" % key)      def __setattr__(self, key, value):         self[key] = value  if __name__=='__main__':     import doctest     doctest.testmod() 

can me this?

it looks using anaconda python distribution.

are running using spyder ide?

there open bug in spyder's issue tracker.

the suggested work-around involves modifying source of pdb , doctest.

for shoddy quick fix can remove the

nosigint=true argument pdb.pdb.init in doctest.py

and change default value of nosigint totrue in pdb.py

if being affected bug, can encourage folk make spyder fix subscribing notifications issue on github