News for hackers. Stuff that matters.
Re:Python past, present, and future with Guido van Rossum [a... by FrederikNS on Thursday February 23, 2017 @09:08AM (#13713928)
Most semi-primitive types in python is immutable, yes (int, float, char, str, and DateTime), but all of the collections are mutable (List, Dict, Set).

I'm sure there are immutable versions of those same data structures hidden somewhere in the standard library, but I haven't looked.

I did stumble upon pyrsistent (https://github.com/tobgu/pyrsistent) a while ago which does provide proper immutable (and persistent) data structures for python.

Re:Python past, present, and future with Guido van Rossum [a... by crdoconnor on Thursday February 23, 2017 @10:02AM (#13714360)
I usually treat them as immutable by using copy(x) or deepcopy(x) unless I'm writing a chunk of code that is explicitly building it from scratch and pushing it somewhere.