[issue46431] Trouble subclassing ExceptionGroup

Irit Katriel report at bugs.python.org
Mon Jan 24 11:41:12 EST 2022


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

This is the fix:

-    if (!PyArg_ParseTuple(args, "UO", &message, &exceptions)) {
+    if (!PyArg_ParseTuple(args,
+                          "UO:BaseExceptionGroup.__new__",
+                          &message,
+                          &exceptions)) {


Then we get

TypeError: BaseExceptionGroup.__new__() takes exactly 2 arguments (1 given)

----------

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


More information about the Python-bugs-list mailing list