2017-03-17から1日間の記事一覧
入門Python3 6.10 staticmethodデコレータを使うと、クラスに静的メソッドを作ることができます。 class Foo(): @staticmethod def hello(): return "hello foo" print(Foo.hello()) $ py main.py hello foo と、ここまで書いてみて、あれこれそういやstatic…
入門Python3 6.10 staticmethodデコレータを使うと、クラスに静的メソッドを作ることができます。 class Foo(): @staticmethod def hello(): return "hello foo" print(Foo.hello()) $ py main.py hello foo と、ここまで書いてみて、あれこれそういやstatic…