AnsweredAssumed Answered

Parentheses Rules

Question asked by nbaylot33 on Feb 6, 2012
Latest reply on Feb 6, 2012 by nbaylot33
import arcpy ## Workspace ## FIPS = "C:\\Users\\D2148\\Documents\\Maps\\FIPS"   #FIPSlist = ('001', '003', '005', '007', '009', '011', '013',   #       '015', '017', '019', '021', '023', '025', '027',   #      '029', '031', '033', '035', '037', '039', '041',    #     '043', '045', '047', '049', '051', '053', '055',     #    '057', '059', '061', '063', '065', '067', '069',      #   '071', '073', '075', '077', '079', '081', '083',       #  '085', '087', '089', '091', '093', '095', '097',        # '099', '101', '103', '105', '107', '109', '111',         #'113', '115', '117', '119', '121', '123', '125',         #'127')         FIPSlist = '001'  ###### CLEAR SELECTION FIRST ######## for fip in FIPSlist:      ## SQL for "Master_TAHI" ##     query = "FIPS_PARIS ='" + fip + "'"      ## SQL for "All_roads_cityjoin" ##   query2 = "Parish_FIP ='" + fip + "'"      ## Create FIPS###.dbf from Master_TAHI ##   arcpy.TableSelect_analysis("Master_TAHI", FIPS + "\\FIPS" + fip + ".dbf",query)      ## Create AllRoadsParish###.shp from All_roads_cityjoin ##   arcpy.Select_analysis("All_roads_cityjoin",FIPS + "\\AllRoadsParish" + fip + ".shp",query2)        ## Create Address Locator ##   Output_Address_Locator = "C:\\Users\\D2148\\Documents\\Maps\\FIPS\\add" + fip       arcpy.CreateAddressLocator_geocoding("US Address - Street Name", "AllRoadsParish" + fip 'Primary Table'", "'Feature ID' OBJECTID VISIBLE NONE;'Prefix Direction' PREFIX VISIBLE NONE;'Prefix Type' <None> VISIBLE NONE;'*Street Name' NAME VISIBLE NONE;'Suffix Type' Street_Cat VISIBLE NONE;'Suffix Direction' SUFFIX VISIBLE NONE;'Left City or Place' <None> VISIBLE NONE;'Right City or Place' <None> VISIBLE NONE;'Left ZIP Code' ZIPL VISIBLE NONE;'Right ZIP Code' ZIPR VISIBLE NONE;'Left State' STATE VISIBLE NONE;'Right State' STATE VISIBLE NONE;'Left Additional Field' Parish_FIP VISIBLE NONE;'Right Additional Field' Parish_FIP VISIBLE NONE", Output_Address_Locator, "")      

These stupid parentheses keep making me so mad.... Are there rules as how to place parentheses? I can't get this code to work, there is a syntax error on this part.

Outcomes