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
What does @convert.register on a value: int | float implementation register in Python 3.1…
from Single-dispatch generic functions
Python 3.14
intermediate
1 min
What does @convert.register on a value: int | float implementation register in Python 3.14?
Separate int and float entries pointing to that implementation
One runtime Union object checked on every call
Only int because it appears first
Nothing; unions are ignored by register
Check
Ask AI about this kata
Report an error
previous kata
Spot the bug in singledispatch routing
Spot the bug
A new version is available
Reload