You can think of the Data Model as a description of Python as a framework. It formalizes the interfaces of the building blocks of the languages itself, such as sequences, iterators, functions, classes, context managers and so on.
The first thing to know about special methods is that the are meant to be called by the Python interpreter, and not by you. You don't write
my_object.__len__(). You writelen(my_object)and ifmy_objectis an instance of a user defined class, then Pyhton calls the__len__instance method you implemented.
Why len is not a method?
lenis not called as a method because it gets special treatment as part of the Python Data Model, just likeabs. But thanks to the special method__len__you can also makelenwork with your own custom objects. This is fair compromise between the need for efficient built-in objects and the consistnecy of the language. Also from the Zen of Python: "Special cases aren't special enough to break the rules."