Skip to content

Distinct instances of the same node do not compare equal #1917

@borellim

Description

@borellim

Example input:

n1 = load_node(42)
n2 = load_node(42)
print n1, type(n1)
print n2, type(n2)
print n1 == n2

Output:

uuid: ddf9a6de-56bf-4783-96d2-33400df20f43 (pk: 42) <class 'aiida.orm.data.upf.UpfData'>
uuid: ddf9a6de-56bf-4783-96d2-33400df20f43 (pk: 42) <class 'aiida.orm.data.upf.UpfData'>
False

Tested with types UpfData, WorkCalculation, PwCalculation.

EDIT: also tested with more "basic" types aiida.orm.data.str.Str and aiida.orm.data.int.Int. For these, some more discussion is possibly required: should the PK/UUID be compared, or the actual data themselves?

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions