Having tried to learn Python by reading Python books rather than ESRI help on Python, I always thought that the looping/iteration with .Next() that I kept seeing in scripts online looked funny, or redundant, or just annoying.
fcs = gp.ListFeatureClasses() fc = fcs.Next() while fc: # Do something fc = fcs.Next()
More Pythonic, I would’ve written it like this:
fcs = gp.ListFeatureClasses() for fc in fcs: # Do something
And I understand from Michalis Avraam’s page here (where I saw the above code samples) that as of version 9.3, the way to go is the Pythonic one. Great !