父節點
9d26db03f0
當前提交
76a49228f0
@ -1,4 +1,24 @@
|
||||
from calculate.variables.datavars import Variable, StringType
|
||||
from calculate.variables.datavars import Variable, StringType, Calculate
|
||||
|
||||
|
||||
class A:
|
||||
@classmethod
|
||||
def test(cls):
|
||||
return "test_0"
|
||||
|
||||
|
||||
class B:
|
||||
def __init__(self):
|
||||
self._value = "test_1"
|
||||
|
||||
def test(self):
|
||||
return self._value
|
||||
|
||||
|
||||
b = B()
|
||||
|
||||
|
||||
Variable("test_0", type=StringType, source=Calculate(A.test))
|
||||
Variable("test_1", type=StringType, source=Calculate(b.test))
|
||||
|
||||
Variable('chroot', type=StringType.readonly, source='/')
|
||||
|
載入中…
新增問題並參考