Skip to content

Reference to a member of a member #1

@kaizu

Description

@kaizu

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions