]> granicus.if.org Git - python/commit
Simplify Counter() API. Replace items keyword argument
authorRaymond Hettinger <python@rcn.com>
Tue, 13 Jan 2009 01:05:03 +0000 (01:05 +0000)
committerRaymond Hettinger <python@rcn.com>
Tue, 13 Jan 2009 01:05:03 +0000 (01:05 +0000)
commitaaa6e630f8440c7a29621863df35fb4c427e5968
treee045d175b38bcd478e36de41af3075cfbb6d42e6
parenta40d57366432cd65915b92fe3e6bfe1d5ad63be0
Simplify Counter() API.  Replace items keyword argument
with a mapping.  Makes Counter() idempotent, makes update()
API the same as Counter.__init__(), makes a more readable
repr, makes the API more dict-like, and allows Steven
Bethard's update() example to work.
Doc/library/collections.rst
Lib/collections.py
Lib/test/test_collections.py