Usage of Python 3 super()
on Stack Overflow
See other posts from Stack Overflow
or by deamon
Published on 2010-05-05T09:23:11Z Indexed on 2010/05/05 13:38 UTC
Read the original article Hit count: 588
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).
- 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
- Would it be better to name the super class like in
© Stack Overflow or respective owner