James Henstridge writes: > When allocating string objects, it allocates "sizeof(PyStringObject) + > size" bytes. Ah, I forgot about that possibility. There are several ways (not limited to your suggestion of "offset(data)+size") to get around that. I wonder why Python doesn't use one.