+ change has_key to has_attr

(all pep8 requirements now met)