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

Where Is The Python Documentation For The Special Methods? (__init__, __new__, __len__, ...)

Where is a complete list of the special double-underscore/dunder methods that can be used in classe… Read more Where Is The Python Documentation For The Special Methods? (__init__, __new__, __len__, ...)

List Of All Python Dunder Methods - Which Ones Do You Need To Implement To Correctly Proxy An Object?

I'm trying to create an object proxy. Attribute/property lookup can be done by simply implement… Read more List Of All Python Dunder Methods - Which Ones Do You Need To Implement To Correctly Proxy An Object?

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?