<div dir="auto"><div><div class="gmail_extra"><div class="gmail_quote">On May 18, 2017 7:37 PM, "Nyall Dawson" <<a href="mailto:nyall.dawson@gmail.com" target="_blank">nyall.dawson@gmail.com</a>> wrote:<br type="attribution"><blockquote class="m_1357006434246953360quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="m_1357006434246953360quoted-text">On 14 May 2017 at 22:09, Andreas Plesch <<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@gmail.com</a>> wrote:<br>
> For use in models it is sometimes useful to generate a boolean output from a<br>
> processing script. Since boolean is not available as output, what would be a<br>
> good workaround ?<br>
> I am simply using string as output type:<br>
> output=str(False)<br>
> but then the receiving script has to work a bit on that input and it is<br>
> awkward to type 'True' if the input script is used standalone.<br>
><br>
> Of course, the real question is why boolean is not offered as output type ?<br>
> To me it would be useful.<br>
<br>
</div>I suspect there's no reason apart from that no-one has had the need<br>
until now and accordingly no-one has coded this feature.<br>
<br>
A PR would be very welcome! (after the upcoming outputs->c++ work lands)</blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">In fact, I took a look at the Python code and found that it would be probably possible to implement following the code for the number type, in a few places in the processing code. I think the models provider may not need changes.</div><div dir="auto"><br></div><div dir="auto">Since I am not very proficient in c++, it will probably more efficient for me to stick to somewhat awkward workarounds. But I will take a look.</div><div dir="auto"><br></div><div dir="auto">(I would like to use Travis as much as possible. Is it possible to avoid building locally altogether ?)</div><div dir="auto"><br></div><div dir="auto"></div></div>