proxy-object

List of all Python dunder/magic methods – Which ones do you need to implement to correctly proxy an object?

List of all Python dunder/magic methods – Which ones do you need to implement to correctly proxy an object? Question: I’m trying to create an object proxy. Attribute/property lookup can be done by simply implementing the __getattribute__, __setattr__ and __delattr__ methods. However, other functionalities like len(x), x[], bool(x) require other dunder methods like __len__, __getitem__, …

Total answers: 1