[issue4322] function with modified __name__ uses original name when there's an arg error

2021-11-26 Thread Irit Katriel
Irit Katriel added the comment: Reproduced on 3.11: >>> def foo(): pass ... >>> foo.__name__ = 'bar' >>> foo(1) Traceback (most recent call last): File "", line 1, in TypeError: foo() takes 0 positional arguments but 1 was given -- nosy: +iritkatriel versions: +Python 3.11 -Pytho

[issue4322] function with modified __name__ uses original name when there's an arg error

2015-09-02 Thread Martin Panter
Martin Panter added the comment: Issue 2786 currently proposes to pass __qualname__; if accepted that might also satisfy this report. -- dependencies: +Names in function call exception should have class names, if they're methods nosy: +martin.panter ___

[issue4322] function with modified __name__ uses original name when there's an arg error

2015-06-20 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +berker.peksag ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue4322] function with modified __name__ uses original name when there's an arg error

2014-03-11 Thread R. David Murray
R. David Murray added the comment: The 'Ex' generally means "this is a public API but we needed to change it, so we made a new function with an extended API". Which means yours would be PyEval_EvalCodeExEx, I suppose :) Seriously, though, I don't know what we actually do in a case like this.

[issue4322] function with modified __name__ uses original name when there's an arg error

2014-03-09 Thread Michele dos Santos da Silva
Michele dos Santos da Silva added the comment: func_name was not available on the places where the error strings are set (PyErr_Format), so I added it and passed it around as needed. This is the simplest approach, but I am not sure it is the best (newbie here). Thus, I am waiting for your comm

[issue4322] function with modified __name__ uses original name when there's an arg error

2013-08-04 Thread Jesús Cea Avión
Changes by Jesús Cea Avión : -- versions: +Python 3.4 -Python 3.0 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue4322] function with modified __name__ uses original name when there's an arg error

2013-08-04 Thread Jesús Cea Avión
Changes by Jesús Cea Avión : -- nosy: +jcea stage: committed/rejected -> needs patch ___ Python tracker ___ ___ Python-bugs-list mailin

[issue4322] function with modified __name__ uses original name when there's an arg error

2013-08-04 Thread Benjamin Peterson
Benjamin Peterson added the comment: I think fixing this is a valid request. -- resolution: invalid -> status: closed -> open ___ Python tracker ___ _

[issue4322] function with modified __name__ uses original name when there's an arg error

2010-12-21 Thread R. David Murray
Changes by R. David Murray : -- resolution: -> invalid stage: -> committed/rejected status: open -> closed ___ Python tracker ___ ___

[issue4322] function with modified __name__ uses original name when there's an arg error

2008-11-14 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: This is because these errors use the code object's name attribute (f.func_code.co_name) for error messages. -- nosy: +benjamin.peterson priority: -> normal ___ Python tracker <[EMAIL PROTECTED]

[issue4322] function with modified __name__ uses original name when there's an arg error

2008-11-13 Thread Erick Tryzelaar
New submission from Erick Tryzelaar <[EMAIL PROTECTED]>: I ran into a case where I modified the __name__ attribute of a function and then didn't specify the right number of arguments, and I got a TypeError that used the original function name, as demonstrated here: >>> def foo(): pass ... >>>