エントリーの編集
エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
記事へのコメント2件
- 注目コメント
- 新着コメント
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています
- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
クラスを継承してオーバーライドするぞ - Qiita
#! /usr/local/bin/python # -*- coding:utf-8 -*- class Parent(object): def show(self): self.stdout... #! /usr/local/bin/python # -*- coding:utf-8 -*- class Parent(object): def show(self): self.stdout() def stdout(self): print "poko" class Child(Parent): def stdout(self): """ オーバーライド """ print "child poko" if __name__ == "__main__": parent = Parent() parent.show() child = Child() child.show()
2016/01/06 リンク