A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2005-September/056013.html below:

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

[Python-Dev] String views (was: Re: Proof of the pudding:str.partition()) [Python-Dev] String views (was: Re: Proof of the pudding:str.partition())skip@pobox.com skip at pobox.com
Fri Sep 2 04:57:29 CEST 2005
    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> strings directly to traditional C API:s.

I'm obviously missing something that's been there all along.  Since Python
strings can contain NULs, why do we bother to NUL-terminate them?  Clearly,
any tradition C API that expects to operate on NUL-terminated strings would
break with a string containing an embedded NUL.

Skip

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4