call the function re.compile with 2 arguments: elements of parts joined into a string, separated with '|',
self . regexes [ state ] = re . compile ( "|" . join ( parts ) , re . MULTILINE | re . VERBOSE )