Python を扱い始めて割と誰もが一度は疑問に思うであろう関数定義について学んだので書き留める。 学習にあたって以下のサイトを参照させて頂いた。 記事内での技術的な理解の誤りについてはもちろん私に文責がある点はご注意を。 python.ms TL;DR Python の関数定義 メソッドと関数定義 第一引数に self を与える意義 Python と Ruby の比較について おわりに TL;DR Python の関数定義における self について調べた クラス定義内でも Python は関数定義の記法でメソッドを記述する クラス定義内で記述した関数定義から メソッドオブジェクト が生成される Python の関数定義 例によって? Python を書き始めて「何でメソッドの第一引数に self を書くんだろう」と疑問に思って調べ物。 class Dog: # class variab