[Tutor] function error

roberto roberto03 at gmail.com
Mon Sep 27 20:02:28 CEST 2010


hello,
i have the following error when i call this function:
   20 def outOfBounds():
---> 21         if abs(turtle.position()[0]) >
turtle.window_height()/2 or abs(turtle.position()[1]) >
turtle.window_width()/2:
     22                 return "true"
     23         else:

TypeError: 'function' object is unsubscriptable

but i can't really figure out where is the problem with this function
'unsubscriptable';
i know it may be something regarding turtle.position returning a list

can you help me with some hint ?

thank you
-- 
roberto


More information about the Tutor mailing list