[issue39212] Show qualified function name when giving arguments error

2020-01-06 Thread Ram Rachum
Ram Rachum added the comment: > But I *did* get that text. I'm asking how you got the *different* text > which you gave in your initial request. Oh, right. Looking back, turns out Wing IDE did that for me. Didn't notice, sorry. > So in my opinion, and I recognise that you may disagree,

[issue39212] Show qualified function name when giving arguments error

2020-01-06 Thread Steven D'Aprano
Steven D'Aprano added the comment: On Sun, Jan 05, 2020 at 10:32:26PM +, Ram Rachum wrote: [...] > TypeError: __init__() takes 2 positional arguments but 3 were given > > As you can see, it's pretty simple to get this exception text, so I'm not > sure why you didn't get that

[issue39212] Show qualified function name when giving arguments error

2020-01-05 Thread Ram Rachum
Ram Rachum added the comment: Here is a short IPython session: In [1]: class Foo: ...: def __init__(self, x): ...: pass

[issue39212] Show qualified function name when giving arguments error

2020-01-04 Thread Steven D'Aprano
Steven D'Aprano 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

[issue39212] Show qualified function name when giving arguments error

2020-01-04 Thread Ram Rachum
New submission from Ram Rachum : I recently got this familiar error: builtins.TypeError: __init__() takes 1 positional argument but 2 were given It was annoying that I didn't know which `__init__` method was under discussion. I wish that Python used the `__qualname__` of the function to