Because there are ``\``s in the docstring, and with 'r' (which means "raw string") those get interpreted as special characters.