Hello, I was surprised to find the following in bytesobject.c: ,---- | [...] | As always, an extra byte is allocated for a trailing \0 byte (newsize | does *not* include that), and a trailing \0 byte is stored. | */ | | int | _PyBytes_Resize(PyObject **pv, Py_ssize_t newsize) | { | [...] | `---- Does this mean that bytes objects are internally stored with a trailing \0? Why is that? Isn't that just wasting a byte, because \0 might also be in the middle of the byte sequence, and the bytes objects stores its length explicitly anyway? Best, -Nikolaus -- GPG encrypted emails preferred. Key id: 0xD113FCAC3C4E599F Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F »Time flies like an arrow, fruit flies like a Banana.«
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