...是能够比较清晰地为学习和掌握Visitor模式提供一些信息,但是对于其中的一个重要知识没有很好地解释,这就是multi-dispatch(多分派),multi-dispatch..
基于48个网页-相关网页
可爱的Python先前的另一期文章开发并描述了一个支持多分派的库。
Another prior Charming Python column developed and presented a library to enable multiple dispatch.
清单1 . multimethods . py中对类型进行多分派。
多分派不仅仅泛化了多态性,它还在许多上下文中提供了更加灵活的继承方式。
Multiple dispatch does not merely generalize polymorphism, it also provides a more flexible alternative to inheritance in many contexts.
应用推荐