擅长:python、mysql、java
<p>坦白说,我真的很喜欢玛蒂恩的回答。为了按照我相信你的原意回答你的问题,你需要跳过Martijn所说的<code>**</code></p>
<pre><code>def a(some_dict):
# do some operations on this dict
b(some_dict)
def b(some_dict):
# do some more operations on this dict
c(some_dict)
def c(some_dict):
# you know how this goes by know, don't you?
# Careful thing to note here: you do not need to reassign here,
# since each function are dealing with a reference to the same
# original object, there is no need to pass it back when we are
# done.
a(some_dict)
</code></pre>
<p>进一步说,这在我认为是工厂模式中非常常见</p>
^{pr2}$