pdlem...@earthlink.net, if you are using Psyco and you aren't using
NumPy and you want max speed you may use:

NROWS = 24
NCOLS = 75
screen = array("H", [0]) * (NROWS * NCOLS)

and then you can use items like this:
screen[r * NCOLS + c]
(If NCOLS is equal or a bit lower than a power of 2 it's better to use
a shift).

But in most situations using lists of lists or NumPy is better.

Bye,
bearophile
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to