Steven D'Aprano <steve+pyt...@pearwood.info> added the comment:
What you are describing is not what we mean by a crash (a core dump or segfault); it sounds like a regular Python exception. Python 3.5 is obsolete and there are no more bug fixes for it except for security fixes. You have not given us enough information to reproduce the problem. The description you give: Function: random.choice() Input: 40 digit integer Expected output: no crash Actual output: Crash works for me: py> import random py> random.choice(1234567890123456789012345678901234567890) # 40 digits Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python3.5/random.py", line 253, in choice i = self._randbelow(len(seq)) TypeError: object of type 'int' has no len() is exactly the exception I would expect from using an int (whether 1 digit or 400 digits) as argument to random.choice. Can you show us the actual code you run, and the actual traceback? Please copy and paste it as text, don't take a screen shot. ---------- nosy: +steven.daprano type: crash -> behavior _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue40388> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com