File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -679,11 +679,7 @@ The :mod:`functools` module defines the following functions:
679679 decorator. When defining a method using ``@singledispatchmethod ``, note
680680 that the dispatch happens on the type of the first non-*self * or non-*cls *
681681 argument::
682- .. note ::
683- ``singledispatchmethod `` dispatches the first argument during call
684- time irrespective of whether the method is bound or unbound, as a result,
685- ``x.f(a) != C.f(x, a) ``.The behavior is intentional and required to support correct dispatch for
686- ``staticmethod `` and ``classmethod ``.
682+
687683 class Negator:
688684 @singledispatchmethod
689685 def neg(self, arg):
@@ -696,6 +692,11 @@ The :mod:`functools` module defines the following functions:
696692 @neg.register
697693 def _(self, arg: bool):
698694 return not arg
695+ .. note ::
696+ ``singledispatchmethod `` dispatches the first argument during call
697+ time irrespective of whether the method is bound or unbound, as a result,
698+ ``x.f(a) != C.f(x, a) ``.The behavior is intentional and required to support correct dispatch for
699+ ``staticmethod `` and ``classmethod ``.
699700
700701 ``@singledispatchmethod `` supports nesting with other decorators such as
701702 :deco: `classmethod `. Note that to allow for
You can’t perform that action at this time.
0 commit comments