Skip to content
CodeWiki
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
Search
⌘K
English
English
Chinese
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
English
English
Chinese
Practice
/
Quiz
/
Python
/
Single-dispatch generic functions
How should singledispatchmethod and classmethod be stacked on the generic method?
from Single-dispatch generic functions
Python 3.14
intermediate
1 min
How should singledispatchmethod and classmethod be stacked on the generic method?
singledispatchmethod outermost, classmethod directly above def
classmethod outermost, singledispatchmethod directly above def
Either order is identical because both preserve register
classmethod is forbidden with singledispatchmethod
Check
Ask AI about this kata
Report an error
previous kata
What happens when two registered, unrelated ABCs both recognize an argument class and nei…
Quiz
next kata
What does this program print?
Predict the output
A new version is available
Reload