Commit aca4779f authored by zhaolin's avatar zhaolin

修正定义类示例代码

parent 43c147da
File added
......@@ -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% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment