Alex Gaynor 6/26/2010

MultiMethods for Python

Read Original

This technical article discusses the concept of multimethods, or generic dispatch, in Python. It explains the idea of routing function calls to different implementations based on argument types, contrasts it with languages like C++, and presents a custom Python implementation using a class and decorators to manage type-based dispatch without relying on global registries or stack frame hacks.

MultiMethods for Python

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week