修正定义类示例代码

This commit is contained in:
zhaolin 2019-05-17 20:34:45 +08:00
parent 43c147dad1
commit aca4779f04
2 changed files with 1 additions and 1 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

View File

@ -44,7 +44,7 @@ class Student(object):
if self.age < 18:
print('%s只能观看《熊出没》.' % self.name)
else:
print('%s正在观看岛国爱情动作片.' % self.name
print('%s正在观看岛国爱情动作片.' % self.name)
```
> **说明**:写在类中的函数,我们通常称之为(对象的)方法,这些方法就是对象可以接收的消息。