Does python create a completely new line (copying the contents) when you perform a substring operation, for example:
new_string = my_old_string[foo:bar]
Or does he use internment to point to old data?
As an explanation, I'm curious if there is a common character buffer, as in Java. I understand that strings are immutable and always seem like a whole new string, and this should be a brand new string object.
python
rhettg Nov 03 '09 at 2:15 2009-11-03 02:15
source share