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
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com