News for hackers. Stuff that matters.
Re:Notset: A Do-Not-Care value for Python by buster on Saturday November 10, 2012 @04:02PM (#4767727)
What's the difference to using "if name is not None:" in the first example?
Re:Notset: A Do-Not-Care value for Python by shmeedogg on Saturday November 10, 2012 @04:09PM (#4767746)
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).
Re:Notset: A Do-Not-Care value for Python by eurleif on Saturday November 10, 2012 @04:14PM (#4767756)
I think this could handled more elegantly if Python supported an Option type, by making 'name' an Option[Option[String]]
Re:Notset: A Do-Not-Care value for Python by jstanley on Saturday November 10, 2012 @04:08PM (#4767744)
You can no longer set the name to None.