Skip to content Skip to sidebar Skip to footer
Showing posts with the label Magic Methods

Why Does Functools.lru_cache Not Cache __call__ While Working On Normal Methods

I have been trying to make functools.lru_cache instance specific as described in this answer, but t… Read more Why Does Functools.lru_cache Not Cache __call__ While Working On Normal Methods

Why Is __getattribute__ Not Invoked On An Implicit __getitem__-invocation?

While trying to wrap arbitrary objects, I came across a problem with dictionaries and lists. Invest… Read more Why Is __getattribute__ Not Invoked On An Implicit __getitem__-invocation?

Reflected Greater Than Magic Methods

I am in need of a reflected magic method 'greater than' and there does not appear to be one… Read more Reflected Greater Than Magic Methods