Actions
Bug #4699
closedArrays - affectation
Description
a = [1,2,3]
b = a
b[1] = 10
the content of a : [1, 10, 3]
why the variables a and b point on the same space ?
a.object_id = b.boject_id
Actions
Added by scicasoft (Cheikh Sidya CAMARA) about 11 years ago. Updated about 11 years ago.
Description
a = [1,2,3]
b = a
b[1] = 10
the content of a : [1, 10, 3]
why the variables a and b point on the same space ?
a.object_id = b.boject_id
This is a feature, not a bug.
If a.object_id == b.object_id, this is a feature.
If a.object_id != b.object_id, this is a bug.