You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you try to share the same object across multiple Documents, you can get into trouble. I stumbled upon this problem because I was trying to re-use an Agent object (representing a lab robot) in multiple Documents. How should pysbol3 handle this scenario?
I was able to repeat your example. Thanks for the very clear report.
I do not think pysbol3 should add a duplicate copy of the object. I think that will present problems of its own. I think if you have a handle to an object, like your variable a, you expect that handle to be accurate, and be the object that is in doc2.
I suspect there is enough information present to raise an exception on the second add (doc2.add(a)) to prevent the addition. Do you think that would work for your use case? Do you think that might be problematic?
If you try to share the same object across multiple
Documents
, you can get into trouble. I stumbled upon this problem because I was trying to re-use anAgent
object (representing a lab robot) in multipleDocuments
. How should pysbol3 handle this scenario?The object now appears to be registered in both
Documents
:That seems OK. However, the back-pointer to the parent doc is a problem:
How should pysbol3 behave? Should it throw an error/warning? Should it attempt to add a duplicate copy of the object instead?
The text was updated successfully, but these errors were encountered: