Is try-except slow?

process circularfunc at
Wed Sep 3 03:14:49 CEST 2008

is this faster btw? I guess big doesn't help, it's only retrieved once
anyway? But is rows retrieved in every loop? the python interpreter
aint too smart?

def getPixels(fileName):
    im =
    colors = []
    r, c = im.size
    big = range(0, c)
    rows = range(0, r)
    for y in big:
        row = []
        for x in rows:
            color = im.getpixel((x,y))
    return numpy.array(colors)

More information about the Python-list mailing list