bool(5) is true
and bool(0) is false
(and bool(None) doesn't work in contrast to python)

So in Julia, C, and Python it is the same.

But unfortunately the "if" statement in Julia does not make the boolean 
conversion.


I know that `if 5` works in Python and in C. Many languages choose to make 
> `0` ¨truthy¨ and all other values ¨falsey¨, meaning that they are used as 
> true/false despite not being booleans. It is by design that this doesn't 
> work in Julia.
>
> -- Leah
>

Reply via email to