Skip to content

Commit

Permalink
modify typos
Browse files Browse the repository at this point in the history
  • Loading branch information
lambdaplus committed May 8, 2016
1 parent 51ee68a commit 27a26bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 209.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ Python 3中也有异常:

##调用覆盖的方法

承接前面的问题和程序,可以对子类`Gril`做出这样的修改。
承接前面的问题和程序,可以对子类`Girl`做出这样的修改。

class Girl(Person):
def __init__(self, name):
Expand Down Expand Up @@ -207,7 +207,7 @@ Python 3中也有异常:
def get_name(self):
return self.name

仅仅修改一处,将`Person.__init__(self, name)`去掉,修改为`super(Girl, self).__init__(name)`实行程序后,显示的结果与以前一样。
仅仅修改一处,将`Person.__init__(self, name)`修改为`super(Girl, self).__init__(name)`执行程序后,显示的结果与以前一样。

关于`super`,有人做了非常深入的研究,推荐读者阅读[《Python’s super() considered super! 》](https://rhettinger.wordpress.com/2011/05/26/super-considered-super/),文中已经探究了`super`的工作过程。读者如果要深入了解,可以阅读这篇文章。

Expand Down

0 comments on commit 27a26bf

Please sign in to comment.