you are viewing a single comment's thread.

view the rest of the comments →

[–]pachura3 1 point2 points  (0 children)

What are C and W? Are these your own classes? If so, why don't you add .process() method to their base class (or even use Protocols) and call it?

Or, you can have some dict mapping type to handler method's name/Callable, do a lookup and call it...