I'm wrong or Will we fix the ducks limp?
Random832 <random832 at fastmail.com>:
> On Sun, Jun 5, 2016, at 02:37, Steven D'Aprano wrote:
>> You bind values (that is, objects)
> Values are not objects. x and z have the same value, and their objects
> are identical but distinct, but they are different because they point
> (or refer, or by your weird terminology "bind") to different objects.
Terminological disputes are not very useful. However, note that your
use of the word "value" is not the only one:
Assignment statements are used to (re)bind names to values and to
modify attributes or items of mutable objects
The returned value (if any) is used as an argument to construct
StopIteration and becomes the StopIteration.value attribute.
The type of the exception is the exception instance?s class, the
value is the instance itself.
while on the other hand,
Every object has an identity, a type and a value.
The operators <, >, ==, >=, <=, and != compare the values of two
objects. The objects do not need to have the same type.
IOW, sometimes the word "value" is a synonym of "object," at other times
it refers to the specific characteristics of an object. The latter
concept is not defined very clearly:
The value of some objects can change. Objects whose value can change
are said to be mutable; objects whose value is unchangeable once they
are created are called immutable. (The value of an immutable
container object that contains a reference to a mutable object can
change when the latter?s value is changed; however the container is
still considered immutable, because the collection of objects it
contains cannot be changed. So, immutability is not strictly the same
as having an unchangeable value, it is more subtle.) An object?s
mutability is determined by its type; for instance, numbers, strings
and tuples are immutable, while dictionaries and lists are mutable.