3 ms·
Well, regardless of the call-by-x discussion, this is actually a really good explanation of scope and state in Python. Code like: def grow(array): array.
by mattdeboard 14y ago
Well, regardless of the call-by-x discussion, this is actually a really good explanation of scope and state in Python. Code like:
def grow(array):
array.append(1)
array = []
grow(array)
leads to such needless complexity.