Commit 95f8ef28 authored by Georg Brandl's avatar Georg Brandl

make "super only for new-style classes" a note.

parent f8741eac
...@@ -1171,8 +1171,10 @@ available. They are listed here in alphabetical order. ...@@ -1171,8 +1171,10 @@ available. They are listed here in alphabetical order.
If the second argument is omitted the super If the second argument is omitted the super
object returned is unbound. If the second argument is an object, object returned is unbound. If the second argument is an object,
``isinstance(obj, type)`` must be true. If the second argument is a type, ``isinstance(obj, type)`` must be true. If the second argument is a type,
``issubclass(type2, type)`` must be true. :func:`super` only works for ``issubclass(type2, type)`` must be true.
:term:`new-style class`\es.
.. note::
:func:`super` only works for :term:`new-style class`\es.
There are two typical use cases for "super". In a class hierarchy with There are two typical use cases for "super". In a class hierarchy with
single inheritance, "super" can be used to refer to parent classes without single inheritance, "super" can be used to refer to parent classes without
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment