エントリーの編集
エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
記事へのコメント1件
- 注目コメント
- 新着コメント
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています
- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
Pythonの「@staticmethod」はどのように役立つのか - モジログ
Peterbe.com - Newfound love of @staticmethod in Python http://www.peterbe.com/plog/newfound-love-... Peterbe.com - Newfound love of @staticmethod in Python http://www.peterbe.com/plog/newfound-love-of-staticmethod Pythonのデコレータ「@staticmethod」はどのように役立つのか、かんたんな例で解説している。 class Printer(object): def __init__(self, text): self.text = text @staticmethod def newlines(s): return s.replace('\n','\r') def printer(self): return self.newlines(self.text) p = Printer('\n\r') assert p.printer() == '\r\r' ここで「@sta



2018/11/14 リンク