Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
buster
· 14y ago · 0 comments
What's the difference to using "if name is not None:" in the first example?
Comments
[–]
shmeedogg
14y ago
That example could probably use some clarification, but the idea is that `name` and `age` in that example are both nullable, so passing in `None` (setting the column to NULL) is different than omitting the value (leaving the column unchanged).
[–]
eurleif
14y ago
I think this could handled more elegantly if Python supported an Option type, by making 'name' an Option[Option[String]]
[–]
jstanley
14y ago
You can no longer set the name to None.