string storage [was: Re: imaplib: is this really so unwieldy?]

Alan Gauld alan.gauld at yahoo.co.uk
Wed May 26 13:43:30 EDT 2021


On 26/05/2021 14:09, Tim Chase wrote:

>> If so, doesn't that introduce a pretty big storage overhead for
>> large strings?
> 
> Yes.  Though such large strings tend to be more rare, largely because
> they become unweildy for other reasons.

I do have some scripts that work on large strings - mainly produced by
reading an entire text file into a string using file.read(). Some of
these are several MB long so potentially now 4x bigger than I thought.
But you are right, even a 100MB string should still be OK on a
modern PC with 8GB+ RAM!...

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Python-list mailing list