[issue16608] immutable subclass constructor call error does not show subclass name

Irit Katriel report at bugs.python.org
Mon Feb 15 15:26:55 EST 2021


Irit Katriel <iritkatriel at yahoo.com> added the comment:

The issue still exists in 3.10:

Python 3.10.0a5+ (heads/master:bf2e7e55d7, Feb 11 2021, 23:09:25) [MSC v.1928 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> class c(tuple):
...  def __init__(s,a,b):
...    tuple.__init__(s,a)
...    self.b = b
...
>>> c(tuple(),666)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: tuple expected at most 1 argument, got 2
>>>

----------
nosy: +iritkatriel
versions: +Python 3.10 -Python 2.7, Python 3.2, Python 3.3, Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue16608>
_______________________________________


More information about the Python-bugs-list mailing list