Return Errors From Function In Python Pep