Irit Katriel <iritkatr...@gmail.com> added the comment:

The error message isn't always this bad:

>>> class Base:
...     def __new__(cls, a, b, c):
...        cls.newargs = (a,b,c)
...     
... 
>>> class Derived(Base):
...     def __init__(self, x):
...         super().__init__(x)
...         self.initargs = (x,)
... 
>>> Derived(1)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: Base.__new__() missing 2 required positional arguments: 'b' and 'c'

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue46431>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to