Terry J. Reedy tjre...@udel.edu added the comment:
The exceptions cannot change in 2.7.
For 3.1.2
class C:
def __len__(self):
return 2**35
c = C()
len(c)
# gives
OverflowError: cannot fit 'int' into an index-sized integer
Maybe (#2690) that will change.
So I do not see any
Paul Boddie p...@boddie.org.uk added the comment:
Actually, in the issue reported, the initial problem occurs in the evaluation
of an object in a boolean context (and the subsequent problem occurs with an
explicit len invocation):