August 17th, 2013, 02:57 PM
TypeError: 'dict' object is not callable
I tried to run a program (moving a circle by arrow keys) on codescupltor but I get this error TypeError: 'dict' object is not callable.
What's wrong in it? I am a beginner so please help me to understand clearly. Thank you.
I get error second line of below code.
if key == simplegui.KEY_MAP('left'):
elif key == simplegui.KEY_MAP("right"):
elif key == simplegui.KEY_MAP("up"):
elif key == simplegui.KEY_MAP("down"):
August 17th, 2013, 03:30 PM
You need to use brackets instead of parentheses: () is calling,  is indexing.
Originally Posted by alapatik
My armada: openSUSE 13.2 (home laptop, work desktop), Debian GNU/Linux 8.0 (home desktop, server), Ubuntu 14.04 LTS (work laptop), OpenELEC 5.0 (HTPC), Android 4.2.1 (tablet)
August 17th, 2013, 08:00 PM
Thank you. Solved.
Originally Posted by SuperOscar