[issue28961] Is it a bug(method `_Call.__new__` in unittest.mock)?

Jiajun Huang report at bugs.python.org
Tue Dec 13 08:47:48 EST 2016


New submission from Jiajun Huang:

code in `_Call.__new__`:

      def __new__(cls, value=(), name=None, parent=None, two=False,                                                                    
      ¦   ¦   ¦   from_kall=True):                                                                                                     
      ¦   name = ''                                                                                                                    
      ¦   args = ()                                                                                                                    
      ¦   kwargs = {}                                                                                                                  
      ¦   _len = len(value)                                                                                                            
      ¦   if _len == 3:                                                                                                                
              ...

the parameter `name` had been override since the function starts. so whatever name is, it's been ignored. Is it a bug? or something else?

----------
components: Library (Lib)
messages: 283104
nosy: Jiajun Huang
priority: normal
severity: normal
status: open
title: Is it a bug(method `_Call.__new__` in unittest.mock)?
type: enhancement
versions: Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28961>
_______________________________________


More information about the Python-bugs-list mailing list