How to replace an instance method?

Dan Stromberg drsalists at gmail.com
Fri Sep 16 18:35:12 EDT 2022


On Fri, Sep 16, 2022 at 2:06 PM Ralf M. <Ralf_M at t-online.de> wrote:

> I would like to replace a method of an instance, but don't know how to
> do it properly.
>

You appear to have a good answer, but...  are you sure this is a good idea?

It'll probably be confusing to future maintainers of this code, and I doubt
static analyzers will like it either.

I'm not the biggest fan of inheritance you'll ever meet, but maybe this is
a good place for it?


More information about the Python-list mailing list