This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author tim.peters
Recipients sangeetamchauhan, tim.peters
Date 2019-09-09.04:47:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1568004468.71.0.362903428178.issue38060@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2019-09-09 04:47:48tim.peterssetrecipients: + tim.peters, sangeetamchauhan
2019-09-09 04:47:48tim.peterssetmessageid: <1568004468.71.0.362903428178.issue38060@roundup.psfhosted.org>
2019-09-09 04:47:48tim.peterslinkissue38060 messages
2019-09-09 04:47:48tim.peterscreate