(self)
| 745 | super().__delitem__(elem) |
| 746 | |
| 747 | def __repr__(self): |
| 748 | if not self: |
| 749 | return f'{self.__class__.__name__}()' |
| 750 | try: |
| 751 | # dict() preserves the ordering returned by most_common() |
| 752 | d = dict(self.most_common()) |
| 753 | except TypeError: |
| 754 | # handle case where values are not orderable |
| 755 | d = dict(self) |
| 756 | return f'{self.__class__.__name__}({d!r})' |
| 757 | |
| 758 | # Multiset-style mathematical operations discussed in: |
| 759 | # Knuth TAOCP Volume II section 4.6.3 exercise 19 |
nothing calls this directly
no test coverage detected