On Mon, Sep 8, 2014 at 4:13 PM, Kenny, Jason L <[email protected]>
wrote:

> Ideally I always viewed this as a True False statement. I see you have it
> returning a tuple.
>
>
>
> I only worry that I have seen a lot push with certain python developers to
> say stuff like
>
>
>
> if not tool.exists():
>
>     # do something…
>
>
>
> This will not work as we will have a (True,””) or (False,””) return API.
> This seems to me to more complex to use and understand. At the very least
> east to trip up on. If we want an object returned. I think it will be
> better to define a error object that can be tested as True or False vs
> forcing tuple separation on returns values.
>

Excellent point.  The 'if not tool.exists()' pattern needs to work.  I'll
rethink that.  Maybe something as simple as tool.exist_error() which can be
called just after exists() returns False...

-- 
Gary
_______________________________________________
Scons-dev mailing list
[email protected]
https://pairlist2.pair.net/mailman/listinfo/scons-dev

Reply via email to