[Python-ideas] Why don't CPython strings implement slicing using a view?

Benjamin Peterson benjamin at python.org
Thu May 7 07:37:33 CEST 2015


Neil Girdhar <mistersheik at ...> writes:

> 
> Since strings are constant, wouldn't it be much faster to implement string
slices as a view of other strings?

Maybe for some workloads, but you can end up keeping a large string alive
and taking up memory with such an approach.



More information about the Python-ideas mailing list