Support for new items in set type
Raymond Hettinger
python at rcn.com
Fri Apr 27 01:24:52 EDT 2007
[Alex Martelli]
> In your shoes, I would write a class whose instances hold three sets:
> -- the "master set" is what you originally read from the file
> -- the "added set" is the set of things you've added since then
> -- the "deleted set" is the set of things you've deleted since them
FWIW, I've posted a trial implementation in the Python cookbook:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/511496
Raymond Hettinger
More information about the Python-list
mailing list