4 ms·
What's the difference to using "if name is not None:" in the first example?
by buster 14y ago
What's the difference to using "if name is not None:" in the first example?
- jstanley 14y agoYou can no longer set the name to None.
- shmeedogg 14y agoThat 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 agoI think this could handled more elegantly if Python supported an Option type, by making 'name' an Option[Option[String]]