Python tricks: Using magic (dunder) functions to create list-like objects @SebastiaanMath%C3%B4t
Python tricks: Using magic (dunder) functions to create list-like objects  @SebastiaanMath%C3%B4t
Uploaded November 2017 | Updated September 2026, 3 weeks ago
(For more, visit https://pythontutorials.eu !) In this video I demonstrate how you can use magic functions, sometimes called dunder (double-underscore) functions, to support special list-like syntax in your own objects. Specifically, I will demonstrate __len__(), __contains__(), and __getitem__().
Python tricks: Using magic (dunder) functions to create list-like objectsOnline psychology experiments with OSWeb and JATOS (#3): Downloading data from JATOSPython Decorators 1: The BasicsOptical illusion: Swinging tower of Pisa (illusory tilt)Analyzing eye-movement and pupil-size data with Python DataMatrixChanges in pupil size in response to lightVision | Biological Psychology 3.3Attention | Biological Psychology 6.2Writing text with your mind (decoding attention through pupillometry)OpenSesame experiment builder on AndroidWho is tracking you when you visit a regular website?Erik Satie — Gnossienne N°1 (with rhythm)
Sebastiaan Mathôt |

Python tricks: Using magic (dunder) functions to create list-like objects

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER