Re: what's unsafe to do in a __getattr__?

2021-10-25 Thread Dieter Maurer
Mats Wichmann wrote at 2021-10-24 19:10 -0600: >Have run into a problem on a "mature" project I work on (there are many >years of history before I joined), there are a combination of factors >that combine to trigger a KeyError when using copy.copy(). > ... >There's a class that's a kind of proxy

Re: what's unsafe to do in a __getattr__?

2021-10-25 Thread Mats Wichmann
On 10/25/21 10:48, Dieter Maurer wrote: Mats Wichmann wrote at 2021-10-24 19:10 -0600: Have run into a problem on a "mature" project I work on (there are many years of history before I joined), there are a combination of factors that combine to trigger a KeyError when using copy.copy(). ...

what's unsafe to do in a __getattr__?

2021-10-24 Thread Mats Wichmann
Have run into a problem on a "mature" project I work on (there are many years of history before I joined), there are a combination of factors that combine to trigger a KeyError when using copy.copy(). I don't want to write a massive essay here but hoping to give enough to set the context.