Good point.  What about

d = {1: []}
d[1].append(2)

Has d changed or not?

Which just goes to show that the SDict implementation above is, as suspected by the author, incomplete for the purpose of detecting all changes to the dict, as well as detecting some that might not be perceived as changes.

I now see there's no simple solution.
And above my normal copy also doesn't work in the above case.
So for the moment I'll use a deepcopy,
hopes that work.
In the future I'll see if it's possible that the "changer" will set the modify flag.

thank you all for the contributions.

Paul and "bearophile", you talks about "functional" languages and balanced trees are a bit too high for my knowledge, all though the program in which I need this is a functional language environment and based on dataflow programming ;-)

cheers,
stef
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to