ecell/epdp — Issue #1: Reference to a member of a member
Author: kaizu
Created: 2012-01-16 09:49:28+00:00
State: open

pos1, pos2 = (0, 0, 0), (1, 1, 1)
radius = 1

did_generator = _gfrd.DomainIDGenerator(0)
shell = _gfrd.SphericalShell(did_generator(), _gfrd.Sphere(pos1, radius))
print shell.shape.position
shell.shape.position = pos2
print shell.shape.position
shell.shape = _gfrd.Sphere(pos2, radius)
print shell.shape.position

This code returns no error, and the output is the following:

(0, 0, 0)
(0, 0, 0)
(1, 1, 1)

shell.shape seems to return a copy of the original, and shell.shape.position is a member of the copy.