File "index.py", line 9 SyntaxError: Non-ASCII character '\xe5' in file index.py on line 9, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
错误点dog = Animal('小花',19), python2中如果源代码文件包含非ASCII字符,您需要在文件的顶部声明文件的编码,否则解释器无法正确解析这些字符。# -*- coding: utf-8 -*-