◐ Shell
clean mode source ↗

GH-146096: Fix base exception group repr by sergey-miryanov · Pull Request #146141 · python/cpython

Thanks for the fix @sergey-miryanov! All looks good to me.
My apologies for not considering that args was mutable in the first implementation!

It's a pity that we don't preserve the list-like repr (ExceptionGroup('msg', [ValueError()])) in this case. But mutating the args to something without an exceptions list in it seems like a weird enough use case that we can just do this?
If this is something that people actually do (why?), we could just set the self->excs_str in all cases, but that can be quite inefficient and I'd really prefer not to.