MCPcopy Index your code
hub / github.com/python/cpython / CounterSubclassWithSetItem

Class CounterSubclassWithSetItem

Lib/test/test_collections.py:2058–2065  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2056################################################################################
2057
2058class CounterSubclassWithSetItem(Counter):
2059 # Test a counter subclass that overrides __setitem__
2060 def __init__(self, *args, **kwds):
2061 self.called = False
2062 Counter.__init__(self, *args, **kwds)
2063 def __setitem__(self, key, value):
2064 self.called = True
2065 Counter.__setitem__(self, key, value)
2066
2067class CounterSubclassWithGet(Counter):
2068 # Test a counter subclass that overrides get()

Callers 1

test_helper_functionMethod · 0.85

Calls

no outgoing calls

Tested by 1

test_helper_functionMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…