I am wondering what the purpose of arcpy.Array() is. It seems an intermediate step between creating a list of objects and performing some sort of conversion, for example, such as in the sample code for the 10.1 help.
features.append(
arcpy.Polyline(
arcpy.Array([arcpy.Point(*coords) for coords in feature])))
What purpose does the arcpy array serve? Why can't a list suffice? What's the logic behind this intermediate step?
iter()function. – Paul Aug 18 '15 at 21:02arcpy.Arrayis creating a Python object equivalent of the ArcObjectsIPointArrayinterface, which is a required input for constructing line/polygon geometries. http://resources.arcgis.com/en/help/arcobjects-net/componenthelp/index.html#//002m0000026w000000 – crmackey Aug 18 '15 at 21:05Array()class inC:\Program Files (x86)\ArcGIS\Desktop10.1\arcpy\arcpy\arcobjects\arcobjects.pyand theArrayMixin()class inC:\Program Files (x86)\ArcGIS\Desktop10.1\arcpy\arcpy\arcobjects\mixins.py(replacing10.1with whatever version you have). – dmahr Aug 19 '15 at 00:43arcgisscripting.pyd(essentially a DLL) which I think is a course grained wrapper of a lot of ArcObjects functionality written in C++. I do know for a fact that ArcObjects is not directly exposed in arcpy/arcgisscripting but you can get at them using thecomtypesmodule. My main point is I think that usingarcpy.Arraypackages up a point collection in a C/C++ like object for easier translation intoarcgisscritping, hence as @dmahr suggested may happen inmixins.py. – crmackey Aug 19 '15 at 12:35