SpecialistOff.NET / Вопросы / Статьи / Фрагменты кода / Резюме / Метки / Помощь / Файлы

Назад

Exercises


Метки: python

  1. Add a class Plastic to TrashVisitor.py.
  2. Add a class Plastic to DynaTrash.py.
  3. Create a decorator like VisitableDecorator, but for the multiple dispatching example, along with an “adapter decorator” class like the one created for VisitableDecorator. Build the rest of the example and show that it works.

Footnotes

[1] Addison-Wesley, 1999.
[2] This was a solution created by Jaroslav Tulach in a design patterns class that I gave in Prague.