Skip to content

Latest commit

 

History

History
19 lines (15 loc) · 638 Bytes

README.md

File metadata and controls

19 lines (15 loc) · 638 Bytes

#Counter - reimplemented

A small reimplementation of Python's Counter Class feature that lets you increment values in a dictionary like object without having to check if they are there.

c = Counter()
c['foobar'] += 1 # Note: No KeyError here!
assert c['foobar'] == 1

Setup

Install py.test (and pytest-watch) and run the test. Run ptw . to rereun the tets whenever a files changes

pip install -r requirements.txt

Other

Originally presented at Berlin Hack and Tell #43