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

Michele dos Santos da Silva report at bugs.python.org
Sun Mar 9 22:34:25 CET 2014


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 comments to improve the solution.

pjenvey noted I cannot just change PyEval_EvalCodeEx, since it is part of the interface. I intend to write a new function and call it from the old interface, setting func_name to co_name.

Before I do that, I want to check if this design is correct. Also, I am not sure what this new function would be called, I am not even sure what the "Ex" means in PyEval_EvalCodeEx.

----------
keywords: +patch
nosy: +mchelem
Added file: http://bugs.python.org/file34318/issue4322.patch

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


More information about the Python-bugs-list mailing list