On 6/28/24 10:08, Ulrich Goebel via Python-list wrote:
By the way: in my usecase I want to pass different functions to different instances of MyClass. It is in the context of a database app where I build Getters for database data and pass one Getter per instance.
If I understood what you're trying to accomplish, you could take a look here (possibly a bit complex for what you need).
https://refactoring.guru/design-patterns/strategy/python/example -- https://mail.python.org/mailman/listinfo/python-list