Do for hasattr() what was done for getattr()

Namely, an exception is raised if the second arg to hasattr() is not a
string or Unicode.
1 file changed