Re: [SQLObject] Default Behaviour when notNull == False
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
|
From: Ian B. <ia...@co...> - 2003-05-05 18:12:52
|
On Thu, 2003-05-01 at 12:20, Luke Opperman wrote: > > Yes, but "NULL" is just computerese for "no value". :) > > Maybe in your world. :) Ok, I guess I'll concede for now. Was this > whole discussion just about whether notNull=False should imply > default=None? I'm still not convinced that my statement: "a field > that CAN have a NULL (notNull=False), but that you still want > explicitly declared (no default)" is useless or gibberish, but > that's probably such a rare case that .... screw 'em. I don't agree with this. To me NULL (and None) has a very specific meaning, though that meaning is usually context-specific (not specified, not known, not applicable, etc). It isn't the same as "default". Python does not use None as a default (except the get method on dictionaries). Instead None must be specified explicitly, in argument lists or elsewhere. I think this is the appropriate behavior for SQLObject to take on as well. Writing "default=None" just doesn't seem that difficult to me. Now, I'm not entirely convinced on this, but if we have a "default" argument to Col anyway, I'd prefer to be explicit about it. Ian |