0
基本的にはどうすればよいですか?親静的メソッドからのPython呼び出し子静的変数
class Parent:
Foo = 'Parent food'
@staticmethod
def bar():
# want to print whatever the child's Foo is
class Child(Parent):
Foo = 'Child foo'
# This should print "Child foo"
Child.bar()
ため
classmethod
を使用することができます。静的メソッドは、その定義によってステートレスです。 –