On 18 Nov 2013 14:30:54 GMT, Steven D'Aprano
<steve+comp.lang.pyt...@pearwood.info> wrote:
- 15 bits for a length.
15 bits give you a maximum length of 32767. There are ways around
that.
E.g. a length of 0 through 32766 means exactly what it says; a
length of
32767 means that the next two bytes are part of the length too,
giving
you a maximum of 4294967295 characters per string. That's an 8GB
string.
Surely big enough for anyone :-)
If you use nearly all of the possible 2 byte values then adding 2
more bytes won't give you anywhere near 4 bI'll ion characters.
You're perhaps thinking of bringing in four more bytes when the
length exceeds 32k.
--
DaveA
--
https://mail.python.org/mailman/listinfo/python-list