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,
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
Ram Rachum added the comment:
Here is a short IPython session:
In [1]: class Foo:
...: def __init__(self, x):
...: pass
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
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