Skip to content

Commit 59923e9

Browse files
committed
WIP
1 parent a3c9b82 commit 59923e9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

docs/pages/concept.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,12 @@ Type resolution order
142142
Here's how typeclass resolve types:
143143

144144
1. We try to resolve exact match by a passed type
145-
2. Then we try to match passed type a given protocols, first match wins
146-
3. Then we traverse ``mro`` entries of a given type, first match wins
145+
2. Then we try to match passed type with ``isinstance``
146+
against types that support it, like protocols and delegates,
147+
first match wins
148+
3. Then we traverse ``mro`` entries of a given type,
149+
looking for ones we can handle,
150+
first match wins
147151

148152
We use cache, so calling typeclasses with same object types is fast.
149153

0 commit comments

Comments
 (0)