|
|
|
|
|
by codesnik
88 days ago
|
|
you could just treat argument initialization as an executable expression which is called every time you call a function. If you have a=[], then it's a new [] every time. If a=MYLIST then it's a reference to the same MYLIST. Simple. And most sane languages do it this way, I really don't know why python has (and maintain) this quirk. |
|
Should the semantic of this be any different? :
Now imagine a: