cellsize or cellSize

903
2
08-20-2021 12:59 AM
Status: Closed
TimJohnston5
New Contributor III

Can we change the spelling of the cellsize parameter in arcpy.PolygonToRaster_conversion()?

It seems that it would be easy to standardized on cellSize in the API for consistency.

 

For example:

arcpy.env.cellSize

arcpy.PolygonToRaster_conversion(..., cellsize=xxx

 

It seems like this would be a quick fix to do a findAndReplace in the API of all spellings of cellsize and convert them to cellSize.  

This may seem minor, but consistency in the API would prevent these kind of simple errors:
TypeError: PolygonToRaster() got an unexpected keyword argument 'cellSize'

 

 

Tags (2)
2 Comments
DanPatterson

one is a property and the other is a parameter, that is probably why the case differences exist so one doesn't confuse them.  This enables you to do this

arcpy.PolygonToRaster_conversion(..., cellsize=arcpy.env.cellSize)

ShaunWalbridge
Status changed to: Closed

Thank you for your contribution to the ideas site. At this time, we do not intend to change the method signatures for ArcPy functions, as the all lowercase name is typical for Python keyword arguments and modifying it at this time would break existing code with the current keyword usage. The env API was derived separately and uses mixed case names at the time of its development. A related change we did add at Pro 2.8 is the arcpy.env names will raise an error if passed a name not matching, e.g. arcpy.env.cellsize will raise.