more descriptive NameError's messages for class attributes
Merge pull request #10249 from shime/descriptive_error_messages

more descriptive error messages for class attributes