Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/python/cpython
/ LongRepr
Class
LongRepr
Lib/test/test_unittest/test_util.py:11–13 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
9
raise
ValueError(
"Invalid repr()"
)
10
11
class
LongRepr:
12
def
__repr__(self):
13
return
'x'
* 100
14
15
safe_repr(RaisingRepr())
16
self.assertEqual(safe_repr(
'foo'
),
"'foo'"
)
Callers
1
test_safe_repr
Method · 0.85
Calls
no outgoing calls
Tested by
1
test_safe_repr
Method · 0.68
Used in the wild
real call sites across dependent graphs
searching dependent graphs…