1. ã¡ã½ãããã¯ã©ã¹ã¡ã½ããã«ããã¨ãã¯ããã³ã¬ã¼ã¿ã使ã ããã¡ã½ãããã¯ã©ã¹ã¡ã½ããã«ããã¨ãã Python ã§ã¯ãã³ã¬ã¼ã¿ã使ããã¨ãã§ããã 2.1 çµã¿è¾¼ã¿é¢æ° ã«ããã¨ã(太åã¯å¼ç¨è ã«ãã) classmethod( function) function ã®ã¯ã©ã¹ã¡ã½ãããè¿ãã¾ãã ã¯ã©ã¹ã¡ã½ããã¯ãã¤ã³ã¹ã¿ã³ã¹ã¡ã½ãããæé»ã®ç¬¬ä¸å¼æ°ã¨ãã¦ã¤ã³ã¹ã¿ã³ã¹ãã¨ãããã«ã第ä¸å¼æ°ã¨ãã¦ã¯ã©ã¹ãã¨ãã¾ããã¯ã©ã¹ã¡ã½ããã宣è¨ããã«ã¯ã以ä¸ã®æ¸ããªãããã使ãã¾ã: class C: @classmethod def f(cls, arg1, arg2, ...): ... ãµã¼ããããã§ã第ä¸å¼æ°ãå¿ é ã§ããããã¯ã©ã¹ãåç §ããã¨ãããã¨ããPython ã®ããããæ¸ãæ¹ã¯ãæåã¨ã£ã¤ãã«ããã¨æããã (+_+) ãã³ã¬ã¼ã¿ã®æ¸ãæ¹ã¨ãã¦ã¯ãé¢æ°ã®åã« @classmeth
{{#tags}}- {{label}}
{{/tags}}