Ed Leafe wrote:
> On Aug 22, 2007, at 1:45 PM, Paul McNett wrote:
>
>>> That said, is it still a good idea to check for UserSQL being None,
>>> as opposed to "if not UserSQL"?
>> None is more explicit, but I could go either way.
>
> I understand, but if the developer writes code like:
>
> self.UserSQL = ""
>
> ...it's obvious that they are trying to clear the value, and not
> execute an empty statement.
I thought about that, too. I agree... actually I think it may be
slightly better to modify the setter like:
if not val:
self._userSQL = None
That way the appdev can see that when they set it to "" or 0 or False,
it actually gets set to None.
--
pkm ~ http://paulmcnett.com
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/dabo-dev/[EMAIL PROTECTED]