Usage of Python 3 super()
- by deamon
I wonder when to use what flavour of Python 3 super().
Help on class super in module builtins:
class super(object)
| super() -> same as super(__class__, <first argument>)
| super(type) -> unbound super object
| super(type, obj) -> bound super object; requires isinstance(obj, type)
| super(type, type2) -> bound super object; requires issubclass(type2, type)
Until now I've used super() only without arguments and it worked as expected (by a Java developer).
Questions:
What does "bound" mean in this context?
What is the difference between bound and unbound super object?
When to use super(type, obj) and when super(type, type2)?
Would it be better to name the super class like in Mother.__init__(...)?