It is much more intuitive, in my opinion, to work with Cursors (rather than trying to emulate the field calculator in a script) for this type of problem. This is how you would port the problem over to an [Update Cursor][1]: import arcpy # The input FC fc = "C:/W/Sik.gdb/yourFC" with arcpy.UpdateCursor(fc, ["aspect", "aspect_m60"]) as cursor: for row in cursor: # row[0] = "aspect" # row[1] = "aspect_m60" if row[0] < 60: row[1] = (row[0] - 60) + 360 elif row[0] == 60: row[1] = row[0] - 60 else: row[1] = row[0] - 60 cursor.updateRow(row) [1]: http://resources.arcgis.com/en/help/main/10.2/index.html#//018w00000014000000