2 ms·
Aren't all variables in Python already somewhat like a pointer? They're a reference to an object, not a memory address containing a value.
by ForHackernews 7y ago
Aren't all variables in Python already somewhat like a pointer? They're a reference to an object, not a memory address containing a value.
- amelius 7y agoYes, but pointers are more basic, since Python's internal references participate in garbage collection. If you would use pointers exclusively, then you'd have to write your own garbage collector. Also, accessing data would be more difficult, and you could not use Python's data types such as classes.