chunking a long string?

wxjmfauth at gmail.com wxjmfauth at gmail.com
Fri Nov 8 15:43:43 EST 2013


"(say, 1 kbyte each)": one "kilo" of characters or bytes?

Glad to read some users are still living in an ascii world,
at the "Unicode time" where an encoded code point size may vary
between 1-4 bytes.


Oops, sorry, I'm wrong, it can be much more.

>>> sys.getsizeof('ab')
27
>>> sys.getsizeof('a\U0001d11e')
48
>>>

jmf





More information about the Python-list mailing list