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: Debian GNU/Linux 8 (desktop, server, work laptop), Linux Mint 17.2 KDE (home laptop), Ubuntu 14.04.3 LTS (HTPC), Android 4.2.1 (tablet)
August 17th, 2013, 09:00 PM
Thank you. Solved.
Originally Posted by SuperOscar