项目描述

PyMultimethods is a library that enables users to create multimethods (a.k.a. generic functions) in Python. In other words, you can create multiple versions of the same function/method. The one that is invoked depends on the runtime parameters. This is similar to polymorphism in the sense that the object type determines which version of the function is invoked. Multimethods go beyond the polymorphism found in conventional object oriented languages, however, because all parameters are taken into account (as opposed to only the "implied this", as in C++ or Java). PyMultimethods can also be used to "overload" a function or method.

(This Description is auto-translated) Try to translate to Japanese Show Original Description

Your rating
Review this project