I did not realize that I should have been deleting cursors after accessing attribute tables until today. Up until now I never did this, but I've noticed that there are lots of file locks after my script runs (I presume it was a bad practice on my part to begin with). ArcGIS 10 help tells me that I should use the following code:

Does 'del row' need to be indented one stop?
–
Chad CooperMar 3 '11 at 13:21

I don't think so - the help file does not do this, and it makes sense (to me) that it should be after the loop completes; though I don't know how row is seen later in the program, as it seems to be out of scope.
–
djqMar 3 '11 at 14:12

Is this a file geodb? If so, did you try creating a new filegdb, then copying all the contents to the new filegdb. I wouldn't think locks would get copied.
–
Kirk KuykendallMar 3 '11 at 15:01

It's not a file geodb; I think the problem may have been just the del row, though it's still crashing half-way through running and I see locks on earlier files, so I'm not sure....
–
djqMar 3 '11 at 15:07

Is the code above the actual failing code? A copy/paste of the function above works fine for me. An indentation problem usually gives a IndentationError not a SyntaxError.
–
Regan SarwasMar 3 '11 at 18:32

I think the problem was with the spacing in the help file that I copied. However, I'm a little confused - is it necessary to delete row? It just exists within the loop as far as I can tell - I suppose it could be deleted on every loop iteration, but that seems inefficient.
–
djqMar 4 '11 at 13:05