[Python-Dev] String views
Greg Ewing
greg.ewing at canterbury.ac.nz
Thu Sep 1 06:00:30 CEST 2005
skip at pobox.com wrote:
> Ah, I forgot the data is part of the PyString object itself, not stored as a
> separate char* array. Without a char* in the object it's kind of hard to do
> views.
That wouldn't be a problem if substrings were a separate
subclass of basestring with their own representation.
That's probably a good idea anyway, since you wouldn't
want slicing to return substrings by default -- it
should be something you have to explicitly ask for.
Greg
More information about the Python-Dev
mailing list