[$] Super Python (part 2)

Post Syndicated from original https://lwn.net/Articles/892080/

Python’s super()
built-in function
can be somewhat confusing, as highlighted by a huge
python-ideas thread that we started looking
at
last week. It is used by methods in class hierarchies to access
methods and attributes in a parent class, but exactly which class
that super() resolves to is perhaps a bit unclear in multiple-inheritance hierarchies.
The discussion in the second “half” of the thread further highlighted some
lesser-known parts of the language.