| 2056 | ################################################################################ |
| 2057 | |
| 2058 | class 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 | |
| 2067 | class CounterSubclassWithGet(Counter): |
| 2068 | # Test a counter subclass that overrides get() |
no outgoing calls
searching dependent graphs…