Merge pull request #125 from amath0312/master

修正定义类示例代码
This commit is contained in:
骆昊 2019-05-18 23:06:51 +08:00 committed by GitHub
commit 9e360492f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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: if self.age < 18:
print('%s只能观看《熊出没》.' % self.name) print('%s只能观看《熊出没》.' % self.name)
else: else:
print('%s正在观看岛国爱情动作片.' % self.name print('%s正在观看岛国爱情动作片.' % self.name)
``` ```
> **说明**:写在类中的函数,我们通常称之为(对象的)方法,这些方法就是对象可以接收的消息。 > **说明**:写在类中的函数,我们通常称之为(对象的)方法,这些方法就是对象可以接收的消息。