August 17th, 2013, 03: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, 04:30 PM
You need to use brackets instead of parentheses: () is calling,  is indexing.
Originally Posted by alapatik
My armada: openSUSE 13.2 (home desktop, work desktop), openSUSE 13.1 (home laptop), Debian GNU/Linux 7.7.0 (mini laptop), Ubuntu 14.04 LTS (server), Android 4.2.1 (tablet), Windows 7 Ultimate (testbed)
August 17th, 2013, 09:00 PM
Thank you. Solved.
Originally Posted by SuperOscar