Proper way in Python to raise errors while setting variables,raise ValueError('password must be longer than 6 characters')