I understand the purpose of the super()
function in Python, but I am a bit hazy on the details and keep having to look them up when I want to use it.
The problem is that most information about super()
is either about Python 2, or about the differences between Python 2 and Python 3. This means that as a Python 3 user I always have to go on a bit of a wild goose chase learning how it used to work in the past before I can understand how it works now.
So, for the sake of myself and others, I thought it would be helpful to ask for a brief summary of how super()
works in Python 3, without reference to the old Python 2 behaviour. I understand its use and purpose, at least at a basic level, but there is some syntactical magic associated with it, and I would like to understand exactly what happens when it is invoked.