def main (a,b): return a
main(1, !field2!)
main(1,2)
main(!field3!, !field4!)
from types import *
if type(c.field) is not NoneType:Then, if you want to return a Null value:
c.field = NoneAll of this where c is your updateCursor and field is the field you are testing and setting.
Isn't it this behavior?
NIM059424 - Null values in the feature class do not get replaced when using Python in the Field Calculator.
Seems to be fixed in 10.1.