Software design patterns Python