Why am I getting a TypeError when looping?
- by Lee Crabtree
I'm working on a Python extension module, and one of my little test scripts is doing something strange, viz.:
x_max, y_max, z_max = m.size
for x in xrange(x_max):
for y in xrange(y_max):
for z in xrange(z_max):
#do my stuff
What makes no sense is that the loop gets to the end of the first 'z' iteration, then throws a…