[issue6893] defaultdict example in py3 doc should mention the new Counter class

2010-09-16 Thread Raymond Hettinger
Raymond Hettinger added the comment: This example needs to stay. It was one of the principal motiviating use cases for defaultdict and it is a good, simple, understandable example of how to use it. Also, I don't want to cross-link these two tools because they a subtly different (the default

[issue6893] defaultdict example in py3 doc should mention the new Counter class

2010-09-16 Thread Mark Lawrence
Changes by Mark Lawrence : -- assignee: georg.brandl -> d...@python nosy: +d...@python ___ Python tracker ___ ___ Python-bugs-list mail

[issue6893] defaultdict example in py3 doc should mention the new Counter class

2009-09-11 Thread Ezio Melotti
New submission from Ezio Melotti : The 3rd example of defaultdict [1] shows how to use it to count the letters of a string, but the new Counter class is a better tool for doing that. Possible solutions: 1) "Setting the default_factory to int makes the defaultdict useful for counting (like a bag