Select to view content in your preferred language

Simple syntax error in Pre-Logic Code Block

415
2
07-24-2012 11:45 AM
by Anonymous User
Not applicable
I just don't see what is wrong here.  I'm getting a syntax error on line 2

Expression -

Reclass(!water!)



Code Block -

def Reclass(wType):
  if wType = "1":
     return "None"
  else:
     return "5"

... Any ideas?
Tags (2)
0 Kudos
2 Replies
BruceNielsen
Frequent Contributor
if wType == "1":
"=" is for assignment, "==" is for comparison.
0 Kudos
by Anonymous User
Not applicable
Gah.  Thanks, I should have seen that.
0 Kudos