compas-dev / compas-dev/compas
Data.guid - mismatch in documentation and actual behaviour
- Dominant language
- Python
- Stars
- 386
- Forks
- 122
- Avg merge
- 11d 46m
- Merged PRs (30d)
- 1
Description
**Describe the bug**
The [documentation ](https://compas.dev/compas/latest/api/generated/compas.data.Data.html#compas.data.Data) states that the `guid` attribute in `Data` is a _"The globally unique identifier of the object."_
However, for example, when creating a `deepcopy()` of an object of a child class of Data, a rather confusing behaviour can be observed:
**To Reproduce**
```
from compas.geometry import Point
from copy import deepcopy()
p1 = Point(0,0,0)
p2 = deepcopy(p1)
print(p1.guid==p2.guid)
>>> True
print(p1.guid is p2.guid)
>>> False
```
**Expected behavior**
Probably expecting a behaviour returning `False` in both comparisons.
Otherwise suggest to mention that this is not the case in the documentation.
Contributor guide
Assessment
This issue has not been assessed yet.