Fallback for operator and other dunder methods

Dieter Maurer dieter at handshake.de
Wed Jul 26 14:01:09 EDT 2023


Dom Grigonis wrote at 2023-7-26 05:22 +0300:
> ...
>Is there a way to achieve it without actually implementing operators?
>I have looked at Proxy objects, but they do not seem suited to achieve this.

Proxying is a good approach:
you might have a look at `dm.reuse.proxy.OverridingProxy` (--> `dm.reuse`
on PyPI).


More information about the Python-list mailing list