New submission from Ram Rachum: I want to use big numbers for length.
>>> class A: ... __len__ = lambda self: 10 ** 20 >>> len(A()) Traceback (most recent call last): File "<pyshell#5>", line 1, in <module> len(A()) OverflowError: cannot fit 'int' into an index-sized integer ---------- components: Interpreter Core messages: 217957 nosy: cool-RR priority: normal severity: normal status: open title: __len__ can't return big numbers versions: Python 3.4 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue21444> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com