MCPcopy Index your code
hub / github.com/python/cpython / MyRepr

Class MyRepr

Lib/test/test_reprlib.py:626–631  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

624
625 def test_custom_repr(self):
626 class MyRepr(Repr):
627
628 def repr_TextIOWrapper(self, obj, level):
629 if obj.name in {'<stdin>', '<stdout>', '<stderr>'}:
630 return obj.name
631 return repr(obj)
632
633 aRepr = MyRepr()
634 self.assertEqual(aRepr.repr(sys.stdin), "<stdin>")

Callers 2

test_custom_reprMethod · 0.85

Calls

no outgoing calls

Tested by 2

test_custom_reprMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…