Skip to content

Commit

Permalink
Merge ab533ad into 9e3c87d
Browse files Browse the repository at this point in the history
  • Loading branch information
srosengren committed Dec 4, 2020
2 parents 9e3c87d + ab533ad commit 5cef74d
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions docs/source/resolution.rst
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):
...

0 comments on commit 5cef74d

Please sign in to comment.