chunking a long string?

Mark Lawrence breamoreboy at yahoo.co.uk
Fri Nov 8 15:57:32 EST 2013


On 08/11/2013 20:43, wxjmfauth at gmail.com wrote:
>
> "(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
>
>

For any newcomers please ignore the rubbish that "Joseph McCarthy" Faust 
comes up with from time to time.  He's been asked repeatedly to come up 
with evidence to support his claims regarding PEP 393, the Flexible 
String Representation, but he never does, clearly because he can't. 
Instead he provides micro benchmarks or meaningless numbers like those 
above.

-- 
Python is the second best programming language in the world.
But the best has yet to be invented.  Christian Tismer

Mark Lawrence




More information about the Python-list mailing list