On Wed, Jul 04, 2018 at 11:08:05AM +0100, Ivan Levkivskyi wrote: > Replying to the question in subject, I think it would be better in > collections as a class. > Having it just as a function doesn't buy much, because one can do the same > with three lines and a defaultdict. > However, if this is a class it can support adding new elements, merge the > groupeddicts, etc.
defaultdicts support adding new elements, and they have an update method same as regular dicts :-) -- Steve _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/