<snip> > I think an even bigger problem is either > (1) checking isvalid on every *lookup*, or > (2) the mess and inefficiency of forcing every (mutable) collection to > (weakly) track all its iterators, and forcing every iterator to have > methods for handling notification. (So now "for k in dict" needs > to allocate (and deallocate) an extra weakref, and to do an extra > insert and delete on the weakrefs list ... OK for large stable > objects like > a module, but not good for large numbers of three-item dicts.)
I agree about #2 whole heartedly ... as for #1, well, dict.iter does this to some extent ... each call to .next entails confirming that the dict and iter agree about the size of the former. I'm not going address these right now because I'm tossing this PEP ... now that I reread it myself I don't really like it. (Things always look good right before you submit them.) I've going to backtrack and describe a Java views style proposal that concrete classes can implement. Cheers - Adam DePrince > > -jJ > _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com