Dictionaries as records
Bill Wilkinson
bwilk_97 at yahoo.com
Wed Dec 19 10:03:08 EST 2001
"Steve Holden"
>
> Try using copy.deepcopy() in place of d.copy() in your first section to
see
> whether it changes the memory requirements significantly. A copy of a
> dictionary does not need to copy the values of the keys or the items,
since
> they are held as references. Using deep copying might duplicate more data
> (though I have not read the interpreter source to verify this...).
No difference in copy and deepcopy here. I checked.
Each record is a new copy as it is. I was sort of suspecting that the first
one was smaller because the strings were being interned. They are all the
same.
> Basically, though, I'm afraid you might have to accept that you have
passed
> some limit of usefulness for the programming technique you originally
chose.
Yes sir, I have accepted that. Now I am just trying to understand what is
happening. Thank you for your assistance.
Bill
More information about the Python-list
mailing list