python factory method

pre: php strpos arrayphp strstr
next: burette and flask