Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/python/cpython
/ NegativeLen
Class
NegativeLen
Lib/test/test_builtin.py:1333–1335 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
1331
return
4.5
1332
self.assertRaises(TypeError, len, FloatLen())
1333
class
NegativeLen:
1334
def
__len__(self):
1335
return
-10
1336
self.assertRaises(ValueError, len, NegativeLen())
1337
class
HugeLen:
1338
def
__len__(self):
Callers
1
test_len
Method · 0.85
Calls
no outgoing calls
Tested by
1
test_len
Method · 0.68
Used in the wild
real call sites across dependent graphs
searching dependent graphs…