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