I'm writing my first Python web application. My code is difficult because it often needs to treat fields separately if they contain a blank value object.propery = ''
and a Null value object.property = None
.
Is there a simple way of dealing with these two values as one? I've noticed some languages have a isNullorEmpty()
function. I've also noticed that if a DB field is set to contain numbers then assigning a blank value to the field just makes it Null
.