{"categories":[{"label":"Software Development","url":"https://skillfed.io/packages/category/software-development/3"}],"enrichment":{"capability":"Enables functions to dispatch on the types of multiple arguments, allowing you to define different implementations for the same function name based on argument types.","skillfed_tags":["polymorphism","function-overloading","type-dispatch"],"use_cases":["Implement mathematical operations that behave differently for different numeric types (int, float, complex) without nested type checks.","Build domain-specific APIs where methods dispatch on argument types to provide specialized behavior for different data structures.","Create generic algorithms that adapt their behavior based on whether inputs are sequences, iterables, or scalar values.","Simplify code that would otherwise use isinstance() chains or a type-based lookup dictionary.","Support plugin systems where different handlers register implementations for different argument type combinations."],"what_it_does":"multipledispatch is a pure-Python library that implements multiple dispatch\u2014a way to select which version of a function to call based on the types of all its arguments, not just the first one. You decorate different implementations of the same function with @dispatch(type1, type2, ...) to register them, and the library automatically routes calls to the right implementation at runtime.\n\nIt handles inheritance, instance methods, union types (e.g., int or float), and abstract base classes. It caches lookups for speed and detects ambiguities at definition time to warn you about conflicts. The library has no external dependencies and is lightweight, making it suitable for codebases that need polymorphic behavior without heavyweight frameworks.","worth_installing":"Yes, if you need multiple dispatch and want a lightweight, dependency-free solution. The library is stable and well-established (since 2014), though dormant\u2014last updated 2023-06-27. It has no known vulnerabilities and is widely used (top 5000 on PyPI). Suitable for production use in projects that benefit from type-based polymorphism without the overhead of heavier frameworks."},"id":"multipledispatch","links":{"html":"https://skillfed.io/packages/multipledispatch","md":"https://skillfed.io/packages/multipledispatch.md","pypi":"https://pypi.org/project/multipledispatch/"},"maintenance":{"status":"dormant"},"meta":{"latest_release":"2023-06-27","license_spdx":null,"license_treatment":"permissive","name":"multipledispatch","python_support":"unspecified","summary":"Multiple dispatch"},"popularity":{"monthly_downloads":5566231,"position":2072,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"1.0.0"}
