[Python-Dev] String views (was: Re: Proof of the pudding: str.partition())
Delaney, Timothy (Tim)
tdelaney at avaya.com
Thu Sep 1 04:14:56 CEST 2005
skip at pobox.com wrote:
> How would this work? One of the advantages of the current string is
> that the underlying data is NUL-terminated, so when passing strings
> to C routines no copying is required.
I didn't say it would be easy. Just that it's about the first cases
where I've seen there could be a real advantage to using string views.
And I don't even know that.
One of the big disadvantages of string views is that they need to keep
the original object around, no matter how big it is. But in the case of
partition, much of the time the original string survives for at least a
similar period to the partitions.
Tim Delaney
More information about the Python-Dev
mailing list