[Scons-dev] This morning's WTF moment

Jean-Baptiste Lab jeanbaptiste.lab at gmail.com
Tue Sep 9 07:25:34 EDT 2014


On 9 September 2014 11:56, Gary Oberbrunner <garyo at oberbrunner.com> wrote:

>
> On Tue, Sep 9, 2014 at 4:03 AM, Jean-Baptiste Lab <
> jeanbaptiste.lab at gmail.com> wrote:
>
>> Or wouldn't it be enough to simply mandate that exists() return something
>> that can be tested against True/False?
>> If that's the case, wouldn't a bit of wrapping around and implementing
>> the __eq__/__neq__ descriptors (possibly __cmp__) be good enough so that we
>> can get to the error description when needed (if False) without breaking
>> existing usages?
>>
>
> I did think about that.  It's hard for me to imagine something that can
> test as false while still having a string value.  Not impossible, but
> pretty weird and a bit un-pythonic. I prefer simplicity over cleverness.
>  Still, if you have an idea, let me know.
>

It might be a bit weird, granted, but I think it might be beneficial to
sacrifice simplicity in that particular case so that the revamping of tools
detection does not require a backward compatibility break of a possibly
quite large public use-case.
I'm currently at work and cannot focus on that much more, I'll try to think
about it a bit more later on.

Cheers,

JB


>
>
-- 
> Gary
>
> _______________________________________________
> Scons-dev mailing list
> Scons-dev at scons.org
> https://pairlist2.pair.net/mailman/listinfo/scons-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist2.pair.net/pipermail/scons-dev/attachments/20140909/d25f1241/attachment.html>


More information about the Scons-dev mailing list