Factory method for objects - best practice? Factory method for objects - best practice? python python