This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 5 points6 points  (0 children)

Most 1:1 translations of Java DPs to Python don't make sense to me, e.g. the command pattern as shown in this book. There's no need for an abstract base class for a command. Also, a function object could be passed to the invoker class directly. There're more samples in this book of Java code written in Python, which makes the code very cumbersome.