How do I mock boto3 method calls when they're called from within a custom class' custom method?
List of all Python dunder methods?
Sounds like a classic case of X-Y-problem. What are you trying to achieve?
I don't think trying to maintain a comprehensive list of dunder methods is a good idea. Consider that this list is bound to change with upcoming versions of Python and has already undergone considerable changes in the past. You may end up maintaining varying lists of magic methods for different versions of Python.
I think the goto approach here would be to just try to call the respective method from within a generic __getattribute__ and react appropriately to TypeError.
It may also be possible to analyse the proxied object's class dict (someobject.__class__.__dict__) to find out which dunder methods were defined on that class. Of course you may end up having to walk up the inheritance chain as well, so this is bound to get quite complicated.
What is Python's list.append() method WORST Time Complexity? It can't be O(1), right?
Need help with Python/SQL - TypeError: 'method' object is not iterable
You forgot () after fetchall, so you referred to the method instead of calling it.