Hello tutors,

I'm having trouble understanding, as well as visualizing, how object
references work in the following situation.  For demonstration purposes I
will keep it at the most rudimentary level:

x = 10

x = x ** x

If my knowledge serves me correctly, Python destroys the value once
reassigned.  So, how does x = x +  1 work if it's destroyed before it can
be referenced?  The only solution I came up with is that the two operands
are evaluated before storing it in the variable, consequently replacing the
original value of 0.
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to