Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions docs/source/resolution.rst
Original file line number Diff line number Diff line change
Expand Up @@ -237,3 +237,20 @@ then one of the competing functions will be selected pseudo-randomly.
By default the selection is dependent on hash, so it will be consistent
during the interpreter session, but it might change from session to
session.

Instance Methods
-----------

If you need multiple dispatch on instance methods, then you would omit providing a type for ``self``

.. code::

class X:

@dispatch(int)
def f(self, y):
...

@dispatch(int, int)
def f(self, y, z):
...