| 376 | |
| 377 | |
| 378 | class CounterWithDisable: |
| 379 | |
| 380 | def __init__(self): |
| 381 | self.disable = False |
| 382 | self.count = 0 |
| 383 | |
| 384 | def __call__(self, *args): |
| 385 | self.count += 1 |
| 386 | if self.disable: |
| 387 | return sys.monitoring.DISABLE |
| 388 | |
| 389 | |
| 390 | class RecorderWithDisable: |
no outgoing calls