Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
operand evaluation order?
#1
Does Python specify the order of evaluation of the operands for a given operator? For instance in

f() + g()

in Java, we know f() will execute first, whereas in C/C++ we know the evaluation order is not specified.
Reply
#2
https://docs.python.org/3/reference/expr...tion-order

read also https://docs.python.org/3/reference/expr...precedence
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#3
Thank you. Can't believe I missed that.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  UndefinedEnvironmentName: 'extra' does not exist in evaluation environment EarthAndMoon 3 1,698 Oct-09-2023, 05:38 PM
Last Post: snippsat
  Conditional evaluation stsxbel 7 3,506 Jun-13-2021, 08:27 PM
Last Post: Gribouillis
  Evaluation of two different list in python? go127a 8 3,639 Apr-22-2019, 12:49 PM
Last Post: snippsat
  list evaluation go127a 2 2,473 Apr-12-2019, 11:13 AM
Last Post: DeaD_EyE
  Recursive evaluation in parsley parser mqnc 0 2,581 Apr-13-2018, 09:02 PM
Last Post: mqnc
  Learning Python, newbie question about strings and evaluation new_learner_999 13 5,965 Feb-18-2018, 03:01 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020