bob gailer wrote:
Kapsicum wrote:
On Mon, Mar 9, 2009 at 1:18 AM, WM. <wfergus...@socal.rr.com
<mailto:wfergus...@socal.rr.com>> wrote:
Traceback (most recent call last):
File "C:\Python26\TicTacToeD.py", line 165, in <module>
main()
File "C:\Python26\TicTacToeD.py", line 150, in main
DisplayBoard(board)
File "C:\Python26\TicTacToeD.py", line 68, in DisplayBoard
print "\n\t", board[1], "|", board[2], "|", board[3]
TypeError: 'function' object is unsubscriptable
error means the object returned is not of type sequence
No. It means that the object does not have a way to handle []. Many
objects are subscriptable besides sequences.
dict, set, objects with certain "special methods" e.g., __getitem__
how about;
print "\n\t", board[0], "|", board[1], "|", board[2]
--
Powered by Gentoo GNU/LINUX
http://www.linuxcrazy.com
pgp.mit.edu
_______________________________________________
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor