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: Debian GNU/Linux 8 (desktop, home laptop, work laptop), Raspbian GNU/Linux 8 (nameserver), Ubuntu 14.04.3 LTS (HTPC), PC-BSD 10.2 (testbed), Android 4.2.1 (tablet)
August 17th, 2013, 08:00 PM
Thank you. Solved.
Originally Posted by SuperOscar