[issue39212] Show qualified function name when giving arguments error
Steven D'Aprano
report at bugs.python.org
Sat Jan 4 17:41:13 EST 2020
Steven D'Aprano <steve+python at pearwood.info> added the comment:
> builtins.TypeError: __init__() takes 1 positional argument but 2 were given
How did you get the fully qualified exception? I just get "TypeError". (Also the error message is different in 3.8.)
> It was annoying that I didn't know which `__init__` method was under discussion.
Couldn't you tell from the stacktrace showing the failed line of code?
I don't know about this. While I can certainly see that there are circumstances where it might be useful (e.g. you're running a .pyc file and there's no source line available), I think that in the majority of the cases showing fully-qualified names would be more annoying than useful, and certainly more intimidating to beginners.
----------
nosy: +steven.daprano
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39212>
_______________________________________
More information about the Python-bugs-list
mailing list