New submission from Xinmeng Xia <xi...@smail.nju.edu.cn>:
The snake game will report a crash in Python3: Traceback (most recent call last): File "/home/xxm/Desktop/instrument/datasetpy3/Snake_game/runGame.py",line 20, in <module> w.addch(food[0], food[1], curses.ACS_PI) TypeError: integer argument expected, got float food is assigned at line 19 "food = [sh/2, sw/2]" addch accepts "int" as the types of the first two parameter. In Python2, it will work well since the results of division will be "int".In Python3 ,the results will be "float" ---------- components: 2to3 (2.x to 3.x conversion tool) files: runGame.py messages: 348712 nosy: xxm priority: normal severity: normal status: open title: 2to3 division problems leading to program crashes in Python3 type: crash versions: Python 3.7 Added file: https://bugs.python.org/file48512/runGame.py _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue37713> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com