-
Notifications
You must be signed in to change notification settings - Fork 0
Simplistic implementation of Clojure-like multimethods in Python, using decorators
License
radhikalism/py-multimethods
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Information about py-multimethods: multimethods.py provides a simplistic implementation of Clojure-like multimethods for Python 2.4 or later. Included classes: * Multimethod: instantiates to an object to which implementing methods belong. Methods are added via the static Multimethod.add() decorator. Methods can be removed or prioritized using Multimethod.remove() and Multimethod.prefer() respectively. * NoMatchingMethodError: thrown when there is no implementing method found for a call with some given arguments. This implies that no default method was added. Methods can only be defined at the top level global namespace. See tests.py for an example of usage.
About
Simplistic implementation of Clojure-like multimethods in Python, using decorators
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published