Another prior Charming Python column developed and presented a library to enable multiple dispatch.
可爱的Python先前的另一期文章开发并描述了一个支持多分派的库。
This concept will be familiar to readers who have used Lisp's CLOS or who have read my discussion of multiple dispatch using Python (Resources).
对于使用过Lisp的CLOS或者读过我对使用Python进行多种分派的讨论(参考资料)的读者,这个概念应该是熟悉的。
Standard Python does not let you configure this type of multiple dispatch; but fortunately, you can do so using the module multimethods that I have written.
标准Python不允许配置这种类型的多分派;但幸运的是,您可以使用我所编写的模块multimethods来做到这一点。
Readers who read my earlier installment on the Gnosis Utilities module, gnosis.magic.multimethods, have had an introduction to the idea of multiple dispatch.
阅读过我之前编写的有关 Gnosis Utilities模块 gnosis.magic.multimethods 的文章的读者对于多分派都有一个基本的印象了。
Perl has a module called Class::Multimethods to implement multiple dispatch (and apparently Perl 6 is slated to build the concept more deeply into the language).
Perl拥有实现多分派的模块Class::Multimethods (显然,Perl6为在语言中更深入构建该概念铺平了道路)。
Still, given the natural association of this idea with my own multiple dispatch module (multimethods), I am excited to look at PEAK's extensions to dispatch styles.
而且,这种思想可以与我的多分派模块(multimethods)很自然地结合起来,我很高兴看到PEAK可以对分派风格进行扩展。
Multiple dispatch does not merely generalize polymorphism, it also provides a more flexible alternative to inheritance in many contexts.
多分派不仅仅泛化了多态性,它还在许多上下文中提供了更加灵活的继承方式。
Multiple dispatch does not merely generalize polymorphism, it also provides a more flexible alternative to inheritance in many contexts.
多分派不仅仅泛化了多态性,它还在许多上下文中提供了更加灵活的继承方式。
应用推荐