提交 aca4779f 编写于 作者: Z zhaolin

修正定义类示例代码

上级 43c147da
文件已添加
......@@ -44,7 +44,7 @@ class Student(object):
if self.age < 18:
print('%s只能观看《熊出没》.' % self.name)
else:
print('%s正在观看岛国爱情动作片.' % self.name
print('%s正在观看岛国爱情动作片.' % self.name)
```
> **说明**:写在类中的函数,我们通常称之为(对象的)方法,这些方法就是对象可以接收的消息。
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册