On Feb 11, 2023, at 8:29 PM, ialibay <ial...@mdanalysis.org> wrote:
I'm not sure I fully understand your option 3 here, are you proposing that using add_TopologyAttr only updates blank values?
Personally I'm somewhere between option 1 or 2.Option 1 is more representative of a standard Python dictionary, it is known behaviour and in many ways that's fine.
Option 2 makes sense when you consider the name of the method, it makes no sense for you to "add an attribute" if it already exists.My take would be to go for a slight middle ground of `add_TopologyAttr(topologyattr, overwrite=False)` where by default it raises an AttributeError if the attribute already exists, and you can allow it to be overriden if you set overwrite=True. This would also allow us to set the default to overwrite=False until we reach the v3.0 release of MDAnalysis.
--
You received this message because you are subscribed to the Google Groups "MDnalysis-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mdnalysis-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mdnalysis-devel/9a131ee2-30d6-4a15-beee-16bf33d901d7n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mdnalysis-devel/F7BF2798-AB8A-4E4F-B426-ED3FC11FAC5C%40gmail.com.