This isn't a regex - it takes a string for an exact match or a tuple. `string.whitespace` is a string (`'\t\n\x0b\x0c\r '`), so it would have to be modified to work here.