On Sat, Jun 15, 2013 at 2:56 AM, Nick the Gr33k <supp...@superhost.gr> wrote:
> What i'm trying to say that both these exprs are Boolean Expressions
> therefore should return Boolean values not variable's values, even if they
> are truthy.

Okay, now we get to the nub of the matter.

In some languages, what you say is the case. In C, for instance, 3 ||
4 == 1 (C doesn't have dedicated True and False types, it uses 1 and
0). But there are very few situations where you actually need it to
specifically be the boolean values, and plenty where you can make use
of this additional feature. If you want to demand a bool from Python,
there is a way to do this. Experiment with bool() in the interactive
interpreter.

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to