| 4 | |
| 5 | |
| 6 | class PairsWithoutTruth: |
| 7 | def __init__(self, pairs): |
| 8 | self.pairs = pairs |
| 9 | |
| 10 | def __iter__(self): |
| 11 | return iter(self.pairs) |
| 12 | |
| 13 | def __bool__(self): |
| 14 | raise ValueError("truth value is ambiguous") |
| 15 | |
| 16 | |
| 17 | class MappingWithoutTruth(dict): |
no outgoing calls