Tim Peters <t...@python.org> added the comment:

I'm sorry you're not satisfied with the answer, but I'm a bona fide expert on 
this and you're not going to get anyone to agree with your confusion here ;-)

But the bug tracker is not the right place for tutorials.  Please take this up 
on, e.g., the Python mailing list instead.  There is no bug here.

One hint:  in

    EXPR1 or EXPR2

bool(EXPR1) is _always_ evaluated first.  It makes no difference at all to this 
whether EXPR1 is "x < y" or "1 + 2 + 3" or "9".  Trying to make a special case 
out of "a numerical value" is entirely in your own head:  the language does 
nothing of the sort.

   9 or (ANYTHING_AT_ALL)

always results in 9, for the same reason

   4+5 or (ANYTHING_AT_ALL)

always results in 9.  Whether the left-hand expression evaluating to 9 is a 
literal or a complex expression is irrelevant.

In the same way, e.g.,

   x = 9
and
   x = 4+6

both bind x to 9.  A numeric literal is just as much "an expression" as any 
other kind of expression.  "Single value" has nothing to do with this.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue38060>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to