The Python documentation seems unclear about whether parameters are passed by reference or value, and the following code produces the unchanged value 'Original' Python文檔彷佛尚不清楚參數是經過引用仍是經過值傳遞,而且如下代碼產生不變的值「原始」 spa
class PassByReference: def __init__(self): self.variable = 'Original' self.change(self.variable) print(self.variable) def change(self, var): var = 'Changed'
Is there something I can do to pass the variable by actual reference? 我能夠作些什麼來經過實際引用傳遞變量嗎? .net