Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/python/cpython
/ InvalidLen
Class
InvalidLen
Lib/test/test_builtin.py:1325–1327 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
1323
raise
ValueError
1324
self.assertRaises(ValueError, len, BadSeq())
1325
class
InvalidLen:
1326
def
__len__(self):
1327
return
None
1328
self.assertRaises(TypeError, len, InvalidLen())
1329
class
FloatLen:
1330
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…