"Raymond Hettinger" <[EMAIL PROTECTED]> wrote: > [Jeff Epler] > > Maybe something for sets like 'appendlist' ('unionset'?) > > While this could work and potentially be useful, I think it is better to keep > the proposal focused on the two common use cases. Adding a third would reduce > the chance of acceptance. > > Also, in all of my code base, I've not run across a single opportunity to use > something like unionset(). This is surprising because I'm the set() author > and > frequently use set based algorithms. Your example was a good one and I can > also image a graph represented as a dictionary of sets. Still, I don't mind > writing out the plain Python for this one if it only comes up once in a blue > moon.
Good example. I actually have a directed graph and multigraph module that uses dictionary of sets internally. It turns out I've used setdefault 8 times in this module alone ! George -- http://mail.python.org/mailman/listinfo/python-list