I have made else like this because I wanted set year, month, and day none values directly from class attribute none_value (In case of subclassed widget).
My mistake is that I put assignements in the string instance test condition. Can'I change like this and ignore this and next notes ?