Dictionaries as records
bwilk_97 at yahoo.com
Wed Dec 19 16:13:41 CET 2001
> In this case, you have one copy of each of your input
> strings, not 15000 copies! The memory usage should be
> pretty close to pure dictionary overhead.
I don't see how that can be. If they were all copies of the same reference,
wouldn't a change in one record be reflected in all? Below I make a change
to one record and the others remain the same:
>>>tbl["g11"] #original value
>>> tbl["g11"] = "f" #change rec one to 'f'/
>>> tbl["g11"] #it's value is different now.
>>> tbl["g11"] #rec 2 remains the same.
Now the question. Am I misunderstanding what is happening above?
Thank you for your assistance
More information about the Python-list