MCPcopy Index your code
hub / github.com/RustPython/RustPython / __repr__

Method __repr__

Lib/collections/__init__.py:753–762  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

most_commonMethod · 0.95

Tested by

no test coverage detected