Get the latest tech news

Ovld – Efficient and featureful multiple dispatch for Python


Advanced multiple dispatch for Python functions. Contribute to breuleux/ovld development by creating an account on GitHub.

This means you can define one ovld that recursively walks generic data structures, and then specialize it in various ways. They may define additional overloads for these methods which will only be valid for the subclass, but they need to use the@extend_super decorator (this is required for clarity): ovld is pretty fast: the overhead is comparable to isinstance or match, and only 2-3x slower when dispatching on Literal types.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of python

python

Related news:

News photo

Making C and Python Talk to Each Other

News photo

Mistral launches API for building AI agents that run Python, generate images, perform RAG and more

News photo

Pyrefly vs. Ty: Comparing Python's two new Rust-based type checkers