79108074

Date: 2024-10-20 21:24:32
Score: 0.5
Natty:
Report link

This is the factory method or strategy pattern. These patterns have very good extensibility, like adding new types is straightforward, just create a new class and update the enum. You can find out more about them here: https://realpython.com/factory-method-python/ and https://refactoring.guru/design-patterns/strategy/python/example

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Single line (0.5):
  • High reputation (-1):
Posted by: oppressionslayer