[issue43460] Exception copy error

2021-06-27 Thread Irit Katriel
Irit Katriel added the comment: See issue32696, issue30005, issue29466 -- components: +Library (Lib) nosy: +iritkatriel versions: +Python 3.11 ___ Python tracker ___ _

[issue43460] Exception copy error

2021-03-10 Thread Douglas Raillard
Douglas Raillard added the comment: The solution based on the signature is something along those lines: class E(BaseException): def __new__(cls, *args, **kwargs): """ Fix exception copying. Turn all the keyword arguments into positional argument

[issue43460] Exception copy error

2021-03-10 Thread Douglas Raillard
New submission from Douglas Raillard : Instances of subclasses of BaseException created with keyword argument fail to copy properly as demonstrated by: import copy class E(BaseException): def __init__(self, x): self.x=x # works fine e = E(None) copy.co