|
|
|
|
|
by macintux
1838 days ago
|
|
Speaking as someone who Friday had to fix an embarrassing bug in my Python code because lists aren’t immutable when passed to another function, I like the way you think. I will say, however, that what I want from Python isn’t actually “frozen” data structures but cloned ones (or, like some/most FP languages, structures with nested values that are only cloned when necessary). Vals, not vars. |
|
Well, lists are never immutable in Python; you want to use tuples for that.