AnsweredAssumed Answered

arcpy.da.SearcherCursor() as Cursor or as Row

Question asked by jborgion Champion on Sep 8, 2017
Latest reply on Sep 11, 2017 by vangelo-esristaff

What is the difference in declaring a search cursor as a cursor or a row?  Is it just a style/personal thing or is there a difference in functionality?  


In Adding to a Selection , Curtis Price uses as row in his solution for me, in SearchCursor—Help | ArcGIS Desktop as cursor is used. There seems to be a slight syntax difference used between the two when accessing the information in the cursor itself:


with arcpy.da.SearchCursor("apLayer", "FullStreet") as rows:
    streets = [row[0] for row in rows]   .......




with arcpy.da.SearchCursor(fc, fields) as cursor:

     for row in cursor:

           blah blah blah blah.......