Skip to content
Snippets Groups Projects
Commit 68dbfcc1 authored by Henrik tom Wörden's avatar Henrik tom Wörden
Browse files

MAINT: added code comment

parent e7a143cc
No related branches found
No related tags found
2 merge requests!95DOC: Added CITATION.cff to the list of files in the release guide where the...,!94Get parents recursively
Pipeline #33836 passed
......@@ -719,6 +719,14 @@ out: List[Entity]
"""
for parent in self.parents:
# TODO:
# Comment on _wrap and _wrapped_entity
# Currently, I (henrik) do not why the wrapping is necessary (and it is not
# documented). However, the following illustrates, why I think, it is a bad idea.
# First you add a parent with rec.add_parent(parent), but then you cannot access
# attributes of parent when you use rec.parents[0] for example becasue you do not get
# the same object but a wrapping object and you need to know that you only get the
# original by accessing the private (!) _wrapped_entity object.
w_parent = parent._wrapped_entity
if retrieve:
parent.retrieve()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment