Re: [Python-Dev] String views (was: Re: Proof of the pudding:str.partition())

2005-09-01 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: >Fredrik> Python strings are character buffers with a known length, not >Fredrik> null-terminated C strings. the CPython implementation >Fredrik> guarantees that the character buffer has a trailing NULL >Fredrik> character, but that's mostly to make it eas

Re: [Python-Dev] String views (was: Re: Proof of the pudding:str.partition())

2005-09-01 Thread skip
Fredrik> Python strings are character buffers with a known length, not Fredrik> null-terminated C strings. the CPython implementation Fredrik> guarantees that the character buffer has a trailing NULL Fredrik> character, but that's mostly to make it easy to pass Python Fredrik>

Re: [Python-Dev] String views (was: Re: Proof of the pudding:str.partition())

2005-08-31 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > As a Python programmer I'd get back what look like three strings: "http", > ":", and "//www.python.org/". If each of them was a view onto part of the > original string, only the last one would truly refer to a NUL-terminated > sequence of characters. If I then wanted t