(self, last=True)
| 44 | curr = curr[self.PREV] |
| 45 | |
| 46 | def pop(self, last=True): |
| 47 | if not self: |
| 48 | raise KeyError('set is empty') |
| 49 | key = next(reversed(self)) if last else next(iter(self)) |
| 50 | self.discard(key) |
| 51 | return key |
| 52 | |
| 53 | def __repr__(self): |
| 54 | if not self: |
no test coverage detected