3 ms·
> in a language like Python, it isn't always clear whether my_list is a value or a reference. I can't think of anything that's a value? At least since Java, th
by thomasahle 3y ago
> in a language like Python, it isn't always clear whether my_list is a value or a reference.
I can't think of anything that's a value? At least since Java, the idea of "everything is an object" seems pretty dominant in most languages.
There are a few immutable types, like ints, strings and tuples, but you still refer to them by reference.
- dragonwriter 3y agoAs a pure implementation detail, IIRC, I think small integers and maybe True/False/None are values in CPython but logically its all references.